I've tried the above program in bloodshed dev-c++. I did everything to spec and tried to run it. The onlything that happens is my dos prompt screen flashes once then dissapears. Is there a solution for this problem ???
I might be wrong but if you use visual studio You use cin>> and cout<< statements instead of the printf. Also, I think you use <iostream> instead of <stdio.h> I am learning c++ with visual studio and it is difficult as I need to unlearn a few things.
ANybody agree or disagree with me?? Is this just a visual studio thing????
the only way to fix it is to flush it all away-tool
You're right that is the way to do IO if you're doing C++. The printf() / scanf() method is the correct way to do that in pure C. So, it's not a Visual Studio thing, just a C++ thing.
Cheers,
cgkanchi
Buy the Snakes of India book, support research and education (sorry the website has been discontinued)
My blog: http://biology000.blogspot.com
Bookmarks