View Single Post
  #1 (permalink)  
Old 04-21-2007, 04:14 PM
badg0r's Avatar
badg0r badg0r is offline
Senior Member
 
Join Date: Dec 2005
Location: Tilburg, The Netherlands
Posts: 1,647
Points: 15.32
Donate
I need a Little help with the cout << in windows programming

Hello members of psp3d,

As you see I came back to my old beloving place to ask you guys for some help.

Ive started to learn c++ for windows cause I cant run linux on my standard defenition tv with my ps3. I had the plan to do some programming in linux when I had my linux up and running on my ps3 system. So this dream is vanished away.

Now my problem...

When I want to see the results of my variable or another print function like simple text I see the text for a mili second and then the prompt is away.

So if I use this code in my compiler:

#include
using namespace std;
int main()
{
// variablen
int a,b;
int uitkomst;

// de waarden van de variablen en het rekenen met variablen
a = 25;
b = 5;
a = a * 4;
uitkomst = a * b;

// Dit wordt op jou beeldscherm geprint
// De \n na de eerste lijn staat voor: newline.
// Hierdoor kun je verschillende teksten of antwoorden plaatsen

cout << "de uitkomst moet 500 zijn dus controleer het goed\n";
cout << uitkomst;

// altijd een opdracht afsluiten met return 0; Vergeet de ; niet

return 0;

}

Then I see:

Quote:
De uitkomst moet 500 zijn dus controleer het goed
500
But only for a mili second.

How can I see it forever in this prompt?

Greetz Badg0r,

p.s. It's not something I will use all the time but I think it's good to know.
__________________

PSP Hacking & Homebrew in het nederlands
Kom ook even bij ons een kijkje nemen

Im working on my own website called: www.badg0r.com Check it out now and then to see if there are any updates

BIG LOL!!

Quote:
Originally Posted by PSPRoX
Im 13 i sex My Pillow....

Jk
Reply With Quote