News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

C++ Doubt

Started by Abiel Francis, November 12, 2013, 10:12:48 AM

Previous topic - Next topic

Abiel Francis

I downloaded and installed Code Blocks 12.11.I made a new project and there was a default file in source main.cpp.I compiled it,then ran it and it was successful."http://postimg.org/image/drz1735ov/".Then i made a new empty file in the same project named 1.cpp and wrote a program and saved it."http://postimg.org/image/5tyx8qvir/".Then i compiled it i got two errors and i couldnt run either of them.But if i delete 1.cpp and then run main.cpp then main.cpp works and vice versa.PLEASE HELP!!!!!!!!

Abiel Francis


BlueHazzard

well, read the error. It will tell what your problem is....

Remember: C::B gives all files from a project to the compiler/linker unless you tell him to ignore the files in this target...

if you don't understand the last sentence in would recommend you a c/c++ Tutorial and: http://wiki.codeblocks.org/index.php?title=The_build_process_of_Code::Blocks

greetings

Abiel Francis

 :D Thank you.Thank you.But I am a newbie so i dint understand anything  ???.So can you tell if i want to make multiple .cpp files and make them run what i should do.

BlueHazzard

You can read: http://wiki.codeblocks.org/index.php?title=The_build_process_of_Code::Blocks and a c++ tutorial....

(Or you make a new project for every cpp file, or you make a target for every cpp file (how you do this read: http://wiki.codeblocks.org/index.php?title=Basic_Tutorial and the other wiki pages))

greetings

thomas

Or, you know, there exists a book that explains the basics of application development, specifically using Code::Blocks:
Application Development with Code::Blocks.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."