Yes.
Type: Posts; User: HumbuckeR
Yes.
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.
I have this function:
void Estacao::mostraInformacaoEstacao()
{
cout << "++ Estacao " << nome << endl;
cout << " tem ligacoes para:" << endl;
//percorre as ligações...
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;...
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...
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;
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. ;)
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?
Hi.
I am having a bit of a problem with a struct.
struct jogador
{
char nome[tamanho_nome];
int ind_jogador;