User forums > Help

Graphics Libraries that work with codeblocks

<< < (5/6) > >>

Seronis:
well  <iostream>  isnt a legal  'C'  library.   Only 'C++'.   you created a C project judging by the extension on your file names.

CodeGuy:
Ok, why are they always C? I made a new file, and its back to giving me that error about the debugger executable. Do I need to install the mingw somewhere in the code::blocks directory?

MortenMacFly:
Look:
By definition:
- *.c files are C files (guess what the extension stands for), so they are operated by the C compiler.
- *.cpp (*.cc, *.c++, *.cxx...) files are C++ files and are operated by the C++ compiler.

Don't put C++ code in C files, otherwise the C compiler will complain and error (as it doesn't not know C++). However, you can put C code in C++ files.

CodeGuy:
Yes I knew that, but how do I create a C++ file? I've been going to File>New>Project then selecting empty project (since I'm not doing anything with ogre, or lightfeather or whatever). Then I go back to File>New>empty file. I did some searching and that didn't help. I typed .cpp after the filename when creating a new file, the second step, but again I get the debugger problem! How do I make sure its compiling or whatever as a C++ file, and how do I get it to debug once I've done that???

evstevemd:
I guess with full respect you need to brush up some concept:
1. What is Compiler
2. What is source code and hence source code editor
3. What is C/C++ their basic difference
4, What is Ide

Once done on that (Some few hours may be), Start with some forums that specializes on C++ like my favorite DaniWeb forum. If you have Code::Block problem then you come back here  :D
IMHO
Steve

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version