This is not visual, nor C++
-
So, you may be asking yourself, with a subject like that, why use this forum? Simple, I did not go elsewhere, as codeproject always has the answer for me. Also, I know nothing of C++. Anyway, my problem. At uni, we have been told we must learn to program in C. Fair enough. But please, what environment should you use for this? I was told (though I am not sure on this) that naming your file with a .c extension, instead of .cpp should do this for you. Anyway, tried that in VS.net, and it cant find So, I tried the same code in Borland C++. It gave me some error about not giving a correct output in my function. So, you may say I am stupid, and made a mistake. But, I copied (and check often), the code from the C Language book (The bible of C I am told). Please solve this for me.
-
So, you may be asking yourself, with a subject like that, why use this forum? Simple, I did not go elsewhere, as codeproject always has the answer for me. Also, I know nothing of C++. Anyway, my problem. At uni, we have been told we must learn to program in C. Fair enough. But please, what environment should you use for this? I was told (though I am not sure on this) that naming your file with a .c extension, instead of .cpp should do this for you. Anyway, tried that in VS.net, and it cant find So, I tried the same code in Borland C++. It gave me some error about not giving a correct output in my function. So, you may say I am stupid, and made a mistake. But, I copied (and check often), the code from the C Language book (The bible of C I am told). Please solve this for me.
What is the exact code you are trying to compile? It is strange that
stdio.h
could not be found. Sounds like you may have an incomplete or corrupted installation of VS.NET. - Mike -
So, you may be asking yourself, with a subject like that, why use this forum? Simple, I did not go elsewhere, as codeproject always has the answer for me. Also, I know nothing of C++. Anyway, my problem. At uni, we have been told we must learn to program in C. Fair enough. But please, what environment should you use for this? I was told (though I am not sure on this) that naming your file with a .c extension, instead of .cpp should do this for you. Anyway, tried that in VS.net, and it cant find So, I tried the same code in Borland C++. It gave me some error about not giving a correct output in my function. So, you may say I am stupid, and made a mistake. But, I copied (and check often), the code from the C Language book (The bible of C I am told). Please solve this for me.
It depends on what the Uni provides. Back in my day, the universities often steadfastly refused to acknowledge the existence of windows, so you were often doing c programming from a unix prompt with a shell account using the... help me out here.. cc compiler? Ie cc source.c target or some such command line. They're going to have to guide you on an environment, because eventually you'll be writing programs and swapping source files and if they don't work in all environs, you'll be wasting your time. My second guess is that they're going to at least start you with pure ANSI c and c++, so TECHNICALLY the environment may not matter as long as you understand your personally chosen environment. In Visual Studio, you can write console programs and stick to completely ANSI code and have no trouble whatsoever. In the Borland environment-- I have no idea. Hope this helps. As far as your particular error, you might send a snippet of code which directly relates to your error. Paul
-
So, you may be asking yourself, with a subject like that, why use this forum? Simple, I did not go elsewhere, as codeproject always has the answer for me. Also, I know nothing of C++. Anyway, my problem. At uni, we have been told we must learn to program in C. Fair enough. But please, what environment should you use for this? I was told (though I am not sure on this) that naming your file with a .c extension, instead of .cpp should do this for you. Anyway, tried that in VS.net, and it cant find So, I tried the same code in Borland C++. It gave me some error about not giving a correct output in my function. So, you may say I am stupid, and made a mistake. But, I copied (and check often), the code from the C Language book (The bible of C I am told). Please solve this for me.
If you want to test code from Kerningham and Ritchie, you can use VC of course. All you have to do is (VC6) First: click on File - New you can now choose the type of project you want to create select WIN32console application name it test (the IDE will append .dsw) click OK Second: Select File - New again you can now choose then type of file vou want to create select sourcecode (.cpp) name it main (the IDE will append .cpp) click OK Now you can cut and paste your sourcecode to the main.cpp file and compile it. (usually the first test would be compiling "Hello World") sledge