solid foundation in C++

solid foundation in C++

Post by pretentious on Thu Sep 20, 2012 12:16 am
([msg=69478]see solid foundation in C++[/msg])

So I've started getting interested in developing large programs. C++ being my language of choice because it feels intuitive, though the more I look into libraries that I'll need and ideas that i will need to implement, the more i realize that I'm not as comfortable with C++ as i thought. So I've picked up the c++ programming Language 3rd edition and am sinking my teeth into it. would you guys recommend using Windows over Linux to learn C++? i have a suspicion that it will be easier on Windows but Linux is my primary OS and I've been reluctant to switch. Also any recommendations for an IDE?
Goatboy wrote:Oh, that's simple. All you need to do is dedicate many years of your life to studying security.

IF you feel like exchanging ASCII arrays, let me know ;)
pretentious wrote:Welcome to bat country
User avatar
pretentious
Contributor
Contributor
 
Posts: 624
Joined: Wed Mar 03, 2010 12:48 am
Blog: View Blog (0)


Re: solid foundation in C++

Post by LoGiCaL__ on Thu Sep 20, 2012 5:53 am
([msg=69479]see Re: solid foundation in C++[/msg])

I personally like using c++ on linux. The only reason I use it in windows is when I port over programs that I've made on linux. There are differences but you do eventually get used to them. It's just the initial getting used to that you gotta get past. As far as recommending which os for you, I say do it on both for the learning experience, but that may not be feasible due to time constraints and other unforeseen circumstances.
User avatar
LoGiCaL__
Addict
Addict
 
Posts: 1060
Joined: Sun May 30, 2010 12:33 pm
Blog: View Blog (0)


Re: solid foundation in C++

Post by ghost107 on Tue Oct 02, 2012 6:00 pm
([msg=69857]see Re: solid foundation in C++[/msg])

You can use any type of OS that supports C++ as programming language, there are libraries with the same name or different name which do the same result.

It is better to learn the similarities of the libraries on mot of the OS and then port your code to be compiled on other operating systems/ compiler (Cross-Platform Applications), To make a cross platform application you must understand the C++ preprocessor, and creating abstract Functions/Classes where the source will be compiled on a certain platform.

A simple cross-platform application would be:
First you would need to create a header that will contain your include files:

Code: Select all
//this symbols could be defined in the project configuration type win32(this is OS specific for windows), win64, unix, mac, gcc, etc
#ifdef WIN32
   #include "WinMyLib.h"
#elif defined(unix)
   #include "UnixMyLib.h"
#elif defined(__APPLE__)
   #include "MacMyLib.h"
#endif
ghost107
Poster
Poster
 
Posts: 132
Joined: Wed Jul 02, 2008 7:57 am
Blog: View Blog (0)



Return to C and C++

Who is online

Users browsing this forum: No registered users and 0 guests