Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

C and C++


ghost's Avatar
0 0

I wanted to know which is the:

best compiler

best socks library

best graphics library

best tutorials site

for beginner level programming in C/C++(preferably C).

I have already searched the internet for answers A LOT and even though I got several good results…I couldn't decide which one to use.

OS should preferably be Windows.(I use vista)


clone4's Avatar
Perl-6 Wisdom Seeker
0 0

onejerlo wrote: I wanted to know which is the:

best compiler

best socks library

best graphics library

best tutorials site

for beginner level programming in C/C++(preferably C).

I have already searched the internet for answers A LOT and even though I got several good results…I couldn't decide which one to use.

OS should preferably be Windows.(I use vista)

Lol yesterday I had exactly same conversation with ynori7. Anyway I can't tell you specifically what is better like you ask, but little overview what I've observed. C++ will be easier to learn first, especially if you have some programming experience… Main difference is in memory management, if you don't manage your memory in C++, compiler will do it for you, however in fairly obscure way (that's why it's not used to write linux kernel btw), whereas with C you have to manage it properly otherwise you can't compile your code. I'd advise to use both of them for a while and then decide what you are more comfortable with. I decided for C, because it forces you to really look after everything, memory, null bytes etc… There isn't really a right answer for the question, either just choose one and go with it, or try both and decide what you are more comfortable with. As for resources, both of them have more then sufficient support, so I wouldn't worry about that. Lastly

ynori7 wrote: If you still can't decide, flip a coin. That's how I solve all my binary dilemmas. ;)


ghost's Avatar
0 0

onejerlo wrote: I wanted to know which is the:

I dont code in c++ often so I will answer these for c

best compiler

I use LCC-win32 (for windows), GCC (linux) <–Preferred, Codewarrior (Freescale chips) <– You probably dont care or would use this.

best socks library

I just use the sys/socket.h header and included libraries. For windows its generally winsocks.h Though you could always try EzSocket (I havent but who knows) http://ezsocket.homelinux.org/

best graphics library

I dont program graphics in C and probably sure you wont or would not want to. C++ people can take this one.

best tutorials site

http://tinyurl.com/cr3fs9 There are tons of them, just pick one and go with it until you need more specific information and Google for those.


Couple of additions, I found winsocks to be a pain in the ass, and thus would recommend getting some linux distro, or Cygwin to code in. Though preferably just linux.

In terms of assuming you are a new programmer, at least to c or c++, I wont say I disagree with Clone on using C++ but I would stay away from object oriented programing until you have the foundation to better understand it. Note c != OOP where c++ is/can be.


hellboundhackersok's Avatar
Banned
0 0

onejerlo wrote: I wanted to know which is the:

best compiler I would say Microsoft Visual C++ 2008 Express Edition, free, works, and is fast. Another would be MinGW with Code::Blocks. I know these are IDEs but they just go together. I would recommend staying away from Dev-C++ too.

best socks library Whatever fits your needs best.

best graphics library Graphics? For 3D you can use Irrlicht, Ogre3D, SDL, anything along those lines; maybe even straight up OpenGL or DirectX, but those aren't beginner-friendly.

best tutorials site I never really used the internet to learn C++, I read books. Go to your local library and pick up a few (it's the best way to learn for me). Alternatively you can download Thinking in C++ which is a great free e-book by Bruce Eckel.


GTADarkDude's Avatar
Member
0 0

The answer is that there is no 'best' of each of those things. For each there are multiple possibilities, and you're supposed to try at least two and see for yourself which you found best. I use Windows XP on this machine and code (sometimes) in C++. I've been using Dev-C++ as my compiler, because I think it works fine. I use winsocks, but I've got to admit there I haven't tried anything else yet, so I can't recommend this. And about graphics libraries, well, I think that fully depends on what you'll be using it for. If you want to create a fully 3D game for Windows, try DirectX or OpenGL. If not, try something else. C/C++ tutorials are all over the web, just Google for some, and search some more, until you find a decent site of which you think you can learn.

If you really can't decide what to choose, just choose multiple options. Eventually you will probably use only one option anyway, because it is the best option for you. Then you can start mastering that single option.


ghost's Avatar
0 0

best compiler

For my opinion, gcc is one of the best compilers. If you want there is also a version for windows: http://www.mingw.org


yours31f's Avatar
Retired
10 0

I recommend and use dev-cpp which uses mingw.


indivisible_int's Avatar
Member
0 0

From books I prefer Deitel and Schildt… Deitel is childrens' book, if you compare it with Stroustrup's papers. Though you have to read Stroustrup's "THE C++ PROGRAMMING LANGUAGE" when you increase your experience.

What about the compiler… gcc and g++ are very good for optimization, but when I'm going to write COM/OLE components I use VS 6.0 . It's not so bulky as VS 2005/2008… or you can use VS 2008 for the better compatibility with Vista.


ghost's Avatar
0 0

I'd choose Code::Blocks instead of dev-cpp. The GUI is better.

And does they actually still update dev-cpp ?


ghost's Avatar
0 0

As for a C/C++ compiler on Windows, I choose Microsoft Visual C++.


Uber0n's Avatar
Member
0 0

454447415244 wrote: As for a C/C++ compiler on Windows, I choose Microsoft Visual C++.

Visual C++ is a bit different than "normal" C++. VC++ is nice, sure, but if you want a normal compiler go for Bloodshed Dev-C++ ;)


ghost's Avatar
0 0

Uber0n wrote: Visual C++ is a bit different than "normal" C++. VC++ is nice, sure, but if you want a normal compiler go for Bloodshed Dev-C++ ;)

I think you can just compile "normally" with VC++ as well. (not that I'm saying you should)


ghost's Avatar
0 0

c4p_sl0ck wrote: [quote]Uber0n wrote: Visual C++ is a bit different than "normal" C++. VC++ is nice, sure, but if you want a normal compiler go for Bloodshed Dev-C++ ;)

I think you can just compile "normally" with VC++ as well.[/quote] Indeed.


ghost's Avatar
0 0

You can compile 'normally' with standard C/C++ libraries in VS but it's quite an effort (especially if you don't know the layout of VS well). Bloodshed/Dev++ I've never used, but heard it was dead…no new updates. GCC is king for compilers, and Code::Blocks is great. I run it on my Vista laptop and it works fine. Google for Code::Blocks website and you can download the IDE (Editor) and Windows GCC (MinGW) compiler all in one windows binary installer, and installation is a snap. It even auto-detects MinGW and links it all for you. Comes with all GCC and standard C libraries, even C99.

Code::Blocks has great syntax highlighting, aligns directly with whatever compiler's key words you have it linked with. It also provides many extra features you can install during setup, like IDE plugins and extra libraries. Also has project templates for everything under the sun (if you have the libraries for that type project), anything from embedded device software to kernel mode drivers, Irrlight game engine to Win32 GUI's, and all sorts of other cool stuff. Also, Code::Blocks will work with many other compilers, and it is easily linked to different ones whenever you want. It is just convenient to download/install it with MinGW, and GCC is the beast of them all. Hope this helps.