Page 1 of 7 123 ... LastLast
Results 1 to 10 of 68

Thread: Fear my c++ madness! beware!

  1. #1
    Join Date
    Apr 2007
    Location
    Wisconsin
    Beans
    83
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Fear my c++ madness! beware!

    do not stare too long, you WILL go into a trance, muwhahaha

    Code:
    #include <iostream>
    using std::cout;
    using std::endl;
    
    int main(int argc, char** argv)
    {
    	int i = 1;
    	int i2 = 1;
    	int i3;
    	
    	while(i < 100)
    	{
    		while (i2 < 75)
    		{
    			i3 = 0;
    			while (i3 < i2)
    			{
    			cout << "*";
    			i3 ++;
    			}
    			
    		usleep(5000);
    		cout << endl;
    		i2 ++;		
    		}
    
    	i2 = 1;
    	}
    	return 0;
    }
    btw this is the best program in c++ ive ever written

  2. #2
    Join Date
    Nov 2007
    Location
    UK
    Beans
    772
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Fear my c++ madness! beware!

    Charming......
    Disclaimer: Yes I usually talk crap

  3. #3
    Join Date
    Apr 2007
    Location
    Wisconsin
    Beans
    83
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Fear my c++ madness! beware!

    i affected someone... my job here is done

  4. #4
    Join Date
    Nov 2007
    Location
    UK
    Beans
    772
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Fear my c++ madness! beware!

    i affected someone... my job here is done
    Infected*
    Disclaimer: Yes I usually talk crap

  5. #5
    Join Date
    Aug 2007
    Location
    Manchester, UK
    Beans
    10,285
    Distro
    Ubuntu

    Re: Fear my c++ madness! beware!

    I can't be bothered to compile it, what does it do?

  6. #6
    Join Date
    Apr 2007
    Location
    Wisconsin
    Beans
    83
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Fear my c++ madness! beware!

    it draws a star pattern like
    *
    **
    ***
    until 75 stars wide and repeats... FOREVER!!! hahahaha

  7. #7
    Join Date
    Feb 2008
    Location
    London
    Beans
    1,032
    Distro
    Ubuntu

    Re: Fear my c++ madness! beware!

    failed to compile; here is output:
    Code:
    me@aquabuntu:~/Desktop/rob-e-cplusplus$ g++ main.cc -o stars
    main.cc:30: error: stray ‘#’ in program
    main.cc:30: error: expected constructor, destructor, or type conversion before ‘<’ token
    main.cc: In function ‘int main(int, char**)’:
    main.cc:34: error: redefinition of ‘int main(int, char**)’
    main.cc:5: error: ‘int main(int, char**)’ previously defined here
    me@aquabuntu:~/Desktop/rob-e-cplusplus$
    how did you compile it? is there a dependency/header i need?
    Server: 2.2GHz Athlon 64; 4GB; 2TB; Debian 5 x64
    LividEmperor: 3.3GHz i5 2500K; 8GB; 660GB; Ubuntu 10.10 x64 + Windows 7 x64
    Netbook1: 1.6GHz Atom; 2GB; 160GB; Ubuntu 10.10 x86
    Dogeatdog: 3GHz Phenom II; 3GB; 1TB; Windows 7 x64

  8. #8
    Join Date
    Jul 2007
    Beans
    108

    Re: Fear my c++ madness! beware!

    This is so uncharacteristic of me, but, wtf?!

    Er, good job.
    DISCLAIMER: You have to explain it to me in the simplest terms.

  9. #9
    Join Date
    Apr 2007
    Location
    Wisconsin
    Beans
    83
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Fear my c++ madness! beware!

    i wrote it in geany and built it there, i assume that uses g++?

  10. #10
    Join Date
    Oct 2006
    Beans
    617
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: Fear my c++ madness! beware!

    do you really need to say while(i < 100)

    why don't you have a recursive version that will be fun
    Registered Linux user # 0x6D9B1

Page 1 of 7 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •