Author Topic: C++ Doubt  (Read 4320 times)

Offline Abiel Francis

  • Single posting newcomer
  • *
  • Posts: 3
C++ Doubt
« on: November 12, 2013, 10:12:48 am »
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!!!!!!!!

Offline Abiel Francis

  • Single posting newcomer
  • *
  • Posts: 3
Re: C++ Doubt
« Reply #1 on: November 12, 2013, 10:56:21 am »
14 Views.no replies. >:(

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: C++ Doubt
« Reply #2 on: November 12, 2013, 10:56:33 am »
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

Offline Abiel Francis

  • Single posting newcomer
  • *
  • Posts: 3
Re: C++ Doubt
« Reply #3 on: November 12, 2013, 11:01:11 am »
 :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.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: C++ Doubt
« Reply #4 on: November 12, 2013, 11:22:27 am »
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

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: C++ Doubt
« Reply #5 on: November 12, 2013, 04:20:31 pm »
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."