Not excecuting
Started by
GhostDJR
, Oct 24 2005 08:40 PM
#1
Posted 24 October 2005 - 08:40 PM
#2
Posted 25 October 2005 - 07:57 AM
you may need to add getch() to the code
#include <iostream.h>
#include <conio.h> // getch()
int main ()
{
cout << "Hello World!";
printf ("\ndone ... press any key to exit\n");
getch();
return 0;
}
#include <iostream.h>
#include <conio.h> // getch()
int main ()
{
cout << "Hello World!";
printf ("\ndone ... press any key to exit\n");
getch();
return 0;
}
#3
Posted 25 October 2005 - 07:45 PM
Actually this is my code right now, I'm playing with strings, I tried your way and it came up with an error in the code. I think I should put some kind of cin in their.
#include <iostream>
#include <string>
using namespace std;
string yell = "A dragon is coming, take cover!!!";
int main(void)
{
cout<<yell.c_str() <<endl
<<yell.c_str() <<endl
<<yell.c_str() <<endl
<<yell.c_str() <<endl;
return 0;
}
#include <iostream>
#include <string>
using namespace std;
string yell = "A dragon is coming, take cover!!!";
int main(void)
{
cout<<yell.c_str() <<endl
<<yell.c_str() <<endl
<<yell.c_str() <<endl
<<yell.c_str() <<endl;
return 0;
}
#4
Posted 25 October 2005 - 07:45 PM
Actually this is my code right now, I'm playing with strings, I tried your way and it came up with an error in the code. I think I should put some kind of cin in their.
#include <iostream>
#include <string>
using namespace std;
string yell = "A dragon is coming, take cover!!!";
int main(void)
{
cout<<yell.c_str() <<endl
<<yell.c_str() <<endl
<<yell.c_str() <<endl
<<yell.c_str() <<endl;
return 0;
}
#include <iostream>
#include <string>
using namespace std;
string yell = "A dragon is coming, take cover!!!";
int main(void)
{
cout<<yell.c_str() <<endl
<<yell.c_str() <<endl
<<yell.c_str() <<endl
<<yell.c_str() <<endl;
return 0;
}
#5
Posted 25 October 2005 - 08:03 PM
this runs on dev-c++:
#include <iostream>
#include <string>
#include <conio.h> // getch()
using namespace std;
string yell = "A dragon is coming, take cover!!!";
int main(void)
{
cout<<yell.c_str() <<endl
<<yell.c_str() <<endl
<<yell.c_str() <<endl
<<yell.c_str() <<endl;
printf ("\ndone ... press any key to exit\n");
getch();
return 0;
}
#include <iostream>
#include <string>
#include <conio.h> // getch()
using namespace std;
string yell = "A dragon is coming, take cover!!!";
int main(void)
{
cout<<yell.c_str() <<endl
<<yell.c_str() <<endl
<<yell.c_str() <<endl
<<yell.c_str() <<endl;
printf ("\ndone ... press any key to exit\n");
getch();
return 0;
}
Similar Topics
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users