Search:

Type: Posts; User: HumbuckeR

Search: Search took 0.00 seconds.

  1. Replies
    5
    Views
    1,182

    Yes.

    Yes.
  2. Replies
    5
    Views
    1,182

    When i try the inheritance i get the following...

    When i try the inheritance i get the following error:

    [CODE]
    C:\[...]\Estacao.h expected class-name before '{' token

    I never used inheritance before, so i don't knoe what might me causing this.
  3. Replies
    5
    Views
    1,182

    Class members accessing problems

    I have this function:



    void Estacao::mostraInformacaoEstacao()
    {
    cout << "++ Estacao " << nome << endl;
    cout << " tem ligacoes para:" << endl;

    //percorre as ligações...
  4. Replies
    6
    Views
    20,361

    The stringstream is a good ideia, and let's me do...

    The stringstream is a good ideia, and let's me do as i want (i think, i have not properly tested it), but could you explain the code to me? Particularly this bit:



    getline(cin, c);

    ss << c;...
  5. Replies
    6
    Views
    20,361

    Thanks for your reply. So... How would I parse...

    Thanks for your reply.

    So... How would I parse a string like this: "i 1 11" and separate it's three elements (i, 1 and 11), after having something like this:



    ...
    ...

    string...
  6. Replies
    6
    Views
    20,361

    Check if a cin is null

    Simple question...

    But not so sure if it's an easy answer...

    I want to check if a cin is null, because i have this:




    char tipo;
  7. Replies
    4
    Views
    3,174

    Thanks a lot swoopy! I only tried the second...

    Thanks a lot swoopy!

    I only tried the second aproach, and it worked great.

    I'll try the other one, too, but will probably stick with the second method.

    Thanks a lot. ;)
  8. Replies
    4
    Views
    3,174

    I forgot to say that "tamanho_nome" is...

    I forgot to say that "tamanho_nome" is initialized as a const int in the beggining of the file, as

    const int tamanho_nome = 11;

    Was this what you were talking about?
  9. Replies
    4
    Views
    3,174

    assignment of arrays problem

    Hi.

    I am having a bit of a problem with a struct.



    struct jogador
    {
    char nome[tamanho_nome];
    int ind_jogador;
Results 1 to 9 of 9