why do i get this error?

http://s1236.photobucket.com/albums/ff451/threatn/?action=view&current=Capture3213.png
why do i the curly red underline for clrscr()??? btw i am using visual studio
What error message do you get?
Odd. I'm not sure why it doesn't recognize clrscr() when it recognizes getch().

-Albatross

P.S. - Even though the C language (I believe) will let it slide, it's still a good idea to explicitly specify that main() returns an int. C++, however, will not.
Last edited on
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
error C3861: 'clrscr': identifier not found
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1
2
3
4
main()
{
   return 0;
}


well do you see why that error cames out??

error C3861: 'clrscr': identifier not found


it is not found because first error isn't resolved.
resolve first error, then clrscr will work just fine.
Last edited on
can you past your code . so that we can see it .
ok ..got it ..
try to use .
1
2
3
4
int main()
{
            return 0;
}
Last edited on
for
http://s1236.photobucket.com/albums/ff451/threatn/?action=view&current=321.png
i still get error C3861: 'clrscr': identifier not found
and for
http://s1236.photobucket.com/albums/ff451/threatn/?action=view&current=321.png#!oZZ3QQcurrentZZhttp%3A%2F%2Fs1236.photobucket.com%2Falbums%2Fff451%2Fthreatn%2F%3Faction%3Dview%26current%3DCapture3213.png
i get
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
error C3861: 'clrscr': identifier not found
At the end of the day, how important is it that you clear the screen (an operation that goes against console programming philosophies) anyway?

-Albatross
http://en.wikipedia.org/wiki/Conio.h "The library functions declared by conio.h vary somewhat from compiler to compiler" clrscr() is not listed there.

¿Why you don't copy-paste your code?
@imbaegod

how about using namespace std ???
@codekiddy
He's using pure C. C doesn't have namespaces.

-Albatross
Albatros,
He's using pure C. C doesn't have namespaces


I'm not shore about that since he is receiving errors related to C++ not C:
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int


but maybe am I missing something here :/
closed account (1vRz3TCk)
The code is C, compiled with a C++ compiler.
conio.h is a non-standard header, so there is no guarantee of what is declared in it.
Topic archived. No new replies allowed.