Re: [Dev-C++] Nead help with my program
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2005-07-14 20:39:01
|
As you can guess, most people NEVER run any exe files they haven't built
themselves, bought from a reputable source or downloaded from a known
site ;)
Anyway: The source code is ok. Your only problem is that when the program
ends, the new window the application runs in will immediately close.
One solution to this, is to add this line:
system("pause");
immediately before the
return 0;
line in the main() function.
This will make the application pause just before it ends. You will then
have time to read the text. Then press Enter to stop the application and
close the window.
/Per W
On Thu, 14 Jul 2005, yakir arbib wrote:
> Hi to all
> I rote a program using cout main and comments
> I compiled and ran it ,but I'm not shoor the code is correct
> Also,the program"woohoo.exe" seems to enter and exit fast when you press
> enter on it,ans I was not able to read it well with my screen reader
> I'd like you to tell me if the code is opperable
> And try running my program and see if it's ok
> Hear is the code:
> #include <iostream>
> #include <cstdlib>
> using namespace std;
> //I dont know visual basic
> int main()
> {
> cout << "I love c++ programming!\n";
> /*this is a comment
> I know I'm good with c++,I hope changing the world,woohoo!
> */
> cout <<" I hope getting better!\n";
> //hope it'll work
> return 0;
> }
> <end of code>
> And I've atached "woohoo.exe"to this email,please try running it
> And tell me if it's ok
> Regards
> Yakir
>
>
|