How do I check if char contains int. I just need to be able to tell if char[256] contains a integer.
Type: Posts; User: kingpinzs
How do I check if char contains int. I just need to be able to tell if char[256] contains a integer.
can any one else give me some ideas?
only one issue if I cahnge it to BallExplode then it does not do any thing? is there something I have to put in so it will read it sence it is at the top?
Edit:
never mind I just have to be...
whould I do something like what is shown below?
do{
getline(fin,test, ' ');
getline(fin,test, '\n');
That is true but I am trying to start the read at ballspin not to get ballspin.
I am may have been unclear to begin with because I am unclear on what is need to solve the problem and what the...
so in the text file that is posted how would you pull the data out?
well when I use getline(fin,test,' '); it does not exit
but when I include the whole line and use
getline(fin,test); it will exit now. I can work with that.
so when it exits how do i pickup...
well I thought it was working but I geuss not when I ran another test.
string test,name;
name = "BallSpin";
do {
So I belive this is the last question If I find the starting string and ending string how would I go about pulling all the data from the middle. the way I was doing it before will not work with the...
Well that ends it at a string
Now I just need to know how to begin it at a string
do
{
I am not sure if that will work.
1) I dont know the length of the text file
2) I dont know were the string is located
3)I am using fstream to open the file
How do I start reading text file from a cretin string and then stop at another string?
ok well the file looks like this
F AnimBall.bmp
L 1
I 93
T 41
O 125
R 0
G 255
B 0
I am using
string s;
int flt;
while (getline(fin , s))
{
I am using get but it is only leting me get one char at a time
while (fin.get(ch))
{
//Image file name
if (ch == 'F' )
{
fin >> imageName;
How can I use fstream .get to get more then one char?
is there a way to make an string array
exp
std::string test[255];
if((File = _findfirst( "image*.txt", &c_file )) == -1L)
{
printf("No %s files in current directory!\n");
thanks ILoveVectors that is exatley what I was looking for.
thanks for every one elses help to.
I know this part
ifstream a_file ("c:\\text.txt");
a_file>>str;
cout<<str;
but instead of having "c:\\text.txt" I need to replace it with
I am trying to use ifstream and I have the file location
"c:\\text.txt" saved into a string text and want to have ifstream load the file loaction and name from that string
is that possible?
getline(MapFile , line_buffer, 'obj' );
this is what I need but it wont let me do it this way.
I search through the file tell I fond this then end the read when I find 'obj2'
can that be...
I need to be able to use more then one simbol becasue I have to tell the difernce per iteam in the file. Can that be done?
How can I have ifsteam go to a sertin token/word/symbol and then read all the info tell the next token/word/symbol?