Author Topic: regarding some ERRORS in code blocks!!! pls help  (Read 7708 times)

Offline sadiq

  • Single posting newcomer
  • *
  • Posts: 2
regarding some ERRORS in code blocks!!! pls help
« on: December 27, 2010, 10:06:27 am »
my questions are:
1.Why code blocks is showing error when i use clrscr();
2.Why code blocks is showing error when i use void main()
3.why code block not supportin <dos.h>...
 
                                 wat settings should i change inorder to solve above three problems.............i have installed currently codeblocks-10.05mingw-setup
     
                THANX IN ADVANCE!!!!
 
             

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5341
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: regarding some ERRORS in code blocks!!! pls help
« Reply #1 on: December 27, 2010, 10:27:23 am »
3.why code block not supportin <dos.h>...       
simple answer:
Mingw does not support building dos applications.
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 reckless

  • Regular
  • ***
  • Posts: 338
Re: regarding some ERRORS in code blocks!!! pls help
« Reply #2 on: December 27, 2010, 02:18:40 pm »
better of with open watcom if you need to develop for dos, an alternative is djgpp if you prefer using bash.

Offline sadiq

  • Single posting newcomer
  • *
  • Posts: 2
Re: regarding some ERRORS in code blocks!!! pls help
« Reply #3 on: January 09, 2011, 08:15:16 pm »
thnx a lot........
but wat about d first two ques,,,,,,,,is dis also because of failure in supporting <dos.h>

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
Re: regarding some ERRORS in code blocks!!! pls help
« Reply #4 on: January 09, 2011, 09:18:21 pm »
investigate. void main() is simply not standard C++, therefore it is not supported. standard C++ is int main().
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100