allegro

This is a discussion on allegro within the Game Programming forums, part of the General Programming Boards category; Code: #include <iostream.h> struct chars { char a1='c'; char a2='0'; char a3='u'; char a4='l'; char a5='d'; char a6='s'; char a7='m'; ...

  1. #1
    Unregistered
    Guest

    allegro

    Code:
    #include <iostream.h>
    
    struct chars
    {
    char  a1='c';
    char  a2='0';
    char  a3='u';
    char  a4='l';
    char  a5='d';
    char  a6='s';
    char  a7='m';
    char  a8='e';
    char  a9='n';
    char  a10='p';
    char  a11='i';
    char  a12='t';
    char  a13='a';
    char  a14='g';
    char  a15='r';
    char  a16='u';
    };
    
    int main() {
    chars c;
    
    cout<<c.a1<<c.a2<<c.a3<<c.a4<<c.a5<<" "<<c.a6<<c.a2<<c.a7
           <<c.a8<<c.a2<<c.a9<<c.a8<<" "<<c.a10<<c.a2<<c.a11
           <<c.a9<<c.a12<<c.a7<<c.a8<<c.a12<<c.a2<<" "<<c.a13
           <<" "<<c.a14<<c.a2<<c.a2<<c.a5<<" "<<c.a13<<c.a4<<c.a4
           <<c.a8<<c.a14<<c.a15<<c.a2<<" "<<c.a12<<c.a16<<c.a12
           <<c.a2<<c.a17<<c.a11<c.a13<<c.a4<<"?\n";
    cout<<"thanx...";
    
    return 0;
    }

  2. #2
    Registered User
    Join Date
    Aug 2001
    Posts
    129
    Foo!

    Maybe next time put some real language in...

    Anyway, you can't initialize those chars in your struct declaration.

    Try

    Code:
    struct chars
    {
        char c0, c1, c2, c3;
    };
    
    int main()
    {
        chars c = { 'c', '0', 'u', 'l' };
    }
    Anyway, seems a bit too hacky what you're doing...
    kooma - t.h@iki.fi

  3. #3
    Registered User
    Join Date
    Oct 2001
    Posts
    375
    c0uld s0me0n ep0intmet 0 ag00 dallegr 0tut 0ia?
    thanx...

    Um.. I ... think this means you would like to be pointed to some Allegro tutorials? www.allegro.cc is a good starting place to look, or check out this thread.

    Allegro precompiled Installer for Dev-C++, MSVC, and Borland: http://galileo.spaceports.com/~springs/

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Allegro in C for a newb
    By Ideius in forum C Programming
    Replies: 5
    Last Post: 12-29-2005, 03:36 PM
  2. Game Programming FAQ
    By TechWins in forum Game Programming
    Replies: 5
    Last Post: 09-29-2004, 02:00 AM
  3. double buffering for allegro
    By Leeman_s in forum C++ Programming
    Replies: 6
    Last Post: 09-12-2002, 02:45 PM
  4. Special Allegro Information
    By TechWins in forum Game Programming
    Replies: 12
    Last Post: 08-20-2002, 11:35 PM
  5. Allegro programming in a window
    By Person Man in forum Windows Programming
    Replies: 0
    Last Post: 11-16-2001, 02:23 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21