Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

cin.getline?

Name: eko 2009-10-16 14:54

I'm a first year student and I study Computer Game Development.
Right now we are learning C++ among other things.

Is there a way to store numbers (int) into an array using something like cin.getline or getline(cin,x) for char arrays.
while typing I want to only separate the numbers with space.

Alternatively I could use a line like:
if(//case 'a' pressed)
    goto y;

Im stuck on this one, feel free to laugh at me

Name: Anonymous 2009-10-17 21:24

>>17


public class Poster
{
   public void intelligentPost(msgBoard board)
   {
      post(board, "Haskell would probably be good for that!");
   }
}

public class Troll extends Poster
{
   override public void intelligentPost(msgBoard board)
   {
      print(board, "LISP would probably be good for that!");
   }
}

public static void main(String [ ] args)
{
   int i;
   Poster anons[100];
   prog = new Board("http://dis.4chan.org/prog/");

   for (i = 0; i < 100; i++)
      anons[i] = new Troll();

   while(true)
   {
      for (i = 0; i < 100; i++)
          anons[i].post(prog);
   }
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List