can you remind me how that works?
for example if I know that the line starts with a number, and I wanted to read that into an int how would I do that?
currentLine >> callery;
oh, I figured it...
Type: Posts; User: help_seed
can you remind me how that works?
for example if I know that the line starts with a number, and I wanted to read that into an int how would I do that?
currentLine >> callery;
oh, I figured it...
Ok thanks, got it.
If I want to take a field from a string and put it into a certain part of a struct, knowing the deliminator is a space, how would I do that?
For example if the line I'm reading...
I have a file with an unkown number of lines. Each line is going to be red into an array of structs. What is the best way for doing this? For example do I have to go through the entire file once,...
GoodGuy.cpp
unsigned int Drib::nextBird(unsigned int visibility)//having a const here screws things up
{
return dielema.nextBird(visibility);
}
GoodGuy.h
no it's not declared const, but it is not a mutator method (nor is any other it calls)
what reasoning is used to make it think that whenever I call the method declared as const that I'm passing it...
unsigned int Drib::nextBird(unsigned int visibility)//having a const here screws things up
{
return dielema.nextBird(visibility);
}
dielema is an instance of a class that I wrote. When I...
crashes at
unsigned int **save = new unsigned int *[rows+1];//increases the rows by 1 and I don't know why.
properTime = 0;
rows = 1;
obstacles = new unsigned int *[rows];
...
ah never mind I'm getting ahead of myself. I never implemented the destructor. Sorry for the waist of a post. I guess there should be a rule like think about a problem for at least 24 hours before...
I am working on a "game". The character is a firefighter and he starts at the bottom of a building (first node in linked list). At every level there is any number of fires. Each fire has a particular...
thanks guys got things straightened out
What IDE would you recommend for a beginner like me? Right now I'm using Scite.
can anyone see what I'm doing wrong here? Some times it works "fine". Other times it stops after printing "after for...
ok thanks, I think I got it working now.
one problem was that I forgot to increase the size (length++) in the case that there were 0 elements in my length.
I don't want to start a whole new...
Hello this is my first post.
I am making a linked list. The problem is that whenever I try to retrieve a value I get the value from the first node.
LinkedList.cpp
#include <iostream>
...