Author Topic: ERROR....  (Read 4312 times)

Offline NeptuneTech

  • Single posting newcomer
  • *
  • Posts: 6
ERROR....
« on: January 15, 2011, 03:48:53 am »
Hi dear frens....i've been using codeblocks 10.05 for a month or so....before i used to use Turbo C++ in my Windows 7(64-bit).....when i ran a simple program as below, i got errors and  i couldnt figure it out.....while the program executed perfectly in TC.
I've set my default compiler as GNU GCC compiler in codeblocks....would u all please help me out....im sorry if my question seems akward to u all......thanks..

[attachment deleted by admin]
!!! ALL EXPERTS WERE ONCE NEWBIES !!!

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: ERROR....
« Reply #1 on: January 15, 2011, 04:02:50 am »
1, this is a pure problem related to c++ language, and not related to Codeblocks. You need <iostream> instead <iostream.h>, I suggest you need to find a c++ tutorial or a c++ book(note please does not use an old c++ tutorial).

2, it is not polite to post the same message twice.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline NeptuneTech

  • Single posting newcomer
  • *
  • Posts: 6
Re: ERROR....
« Reply #2 on: January 15, 2011, 04:06:26 am »
2, it is not polite to post the same message twice.

im sorry for posting twice....but i have a bit of slow internet connection......thanks for your support....but i guess minNW has libraries that already has iostream.h defined in it and can be included in a program as a header file anytime the user desires,( unless the user creates his/her own header file)
!!! ALL EXPERTS WERE ONCE NEWBIES !!!

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: ERROR....
« Reply #3 on: January 15, 2011, 09:00:04 am »
As first: I removed your other thread.

Your post and your answer on ollydbg post shows, that you don't know very much about programming in (standard) C++.

This forum/website is dedicated to the use of (and the development of) C::B, not to teach programming basics.

And be aware, that C::B is the IDE and MinGW the compiler, and this is not a MinGW forum.
Even if we ship MinGW bundled with C::B, we can not give support for it.

Please ask your questions in an appropriate forum, or find a good C++ book or tutorial, topic like this might be locked with or without a notice or even silently deleted, because they violate our forum rules and the netiquette (capital letters are read as crying/shouting) and topic titles should be as meningfull as possible.
Maybe you should read this: http://www.catb.org/~esr/faqs/smart-questions.html.

By the way:
I also have a very slow internet connection, but I normally do not post twice.
And why do you post an image (if your connection is slow), why do yo not just copy and paste your error message and post it here ?
« Last Edit: January 15, 2011, 09:01:53 am by jens »