954,141 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Just a lil fun

i made this just the other day, and as a new member i thought i would share this lil thing. many have probably already seen it, but its just a fun lil thing from a beginning programmer.

/*
  Name: Go Starwars!
  Author: Evan Cohen
  Date: 27/11/07 19:11
  Description: Runs starwars
*/

#include <iostream.h> 
#include <windows.h>

int sim_yesno;

int main()
{  
    
    cout << "Press 1 the enter to start starwars: "; //Asks for simulation confermation
    cin >> sim_yesno; //Gets confermation
    
    if(sim_yesno == 1)  // if confermation yes: then continue
    {
    system ("telnet towel.blinkenlights.nl");  //Runs the star wars.
    }
    
    
    system ("Pause"); // pause befor quit
    return 0;
}
onelilfizzle
Newbie Poster
3 posts since Nov 2007
Reputation Points: 10
Solved Threads: 1
 

cool because i like starwars otherwise i am not sure of it's purpose.

Killer_Typo
Master Poster
781 posts since Apr 2004
Reputation Points: 152
Solved Threads: 39
 

doesn't work on MS-Windows os.

Ancient Dragon
Retired & Loving It
Team Colleague
30,041 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,341
 
doesn't work on MS-Windows os.

Worked for me on XP, with VC++ 2005 express. After dropping the ".h" from iostream header.

Well, I can't say the system(pause) worked, I killed it long before the movie finished.

Val

vmanes
Posting Virtuoso
1,914 posts since Aug 2007
Reputation Points: 1,268
Solved Threads: 228
 

I created a cmd.exe command prompt window and tried to execute "telnet towel.blinkenlights.nl" -- got error that telnet now found.

Ancient Dragon
Retired & Loving It
Team Colleague
30,041 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,341
 
I created a cmd.exe command prompt window and tried to execute "telnet towel.blinkenlights.nl" -- got error that telnet now found.

*&^%$# Vista Home.... telnet is not installed by default. See http://tinyurl.com/2fgoy8 for steps to activate it. When the dialog says "this may take several minutes" it's not kidding!

Val

vmanes
Posting Virtuoso
1,914 posts since Aug 2007
Reputation Points: 1,268
Solved Threads: 228
 

YES, Thank you for that link.

Ancient Dragon
Retired & Loving It
Team Colleague
30,041 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,341
 

Great link..thx again!

zandiago
Nearly a Posting Maven
2,480 posts since Jun 2007
Reputation Points: 129
Solved Threads: 26
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You