need help reading from a file

Hi

I am having problems reading from a file in c++. The development environment that I am using is the Code composer studio (CCS) v3.3, this environment do not recognize the libraries iostream and fstream, but recognize the stdio.h and string.h. when I read from a file I use the following code:

//Reading a file from PC

// Reading the test input message

puts("Reading the test input message");
inputMessage=fopen("exampleRead.txt","r");

if((inputMessage)==NULL)
{
puts("File could not be opened");
}
else
{
puts("Reading the test message from the file");
for(int temp = 0; temp < COUNT; temp++)
{
fscanf(inputMessage, "%d",&test[temp]);
printf("The value read at %d is %d\n", temp, tes[temp]);

}


}

fclose(inputMessage);
puts("done reading inputMessage");

and it works correctly, but the problem is that now I need to read something like this:

cellIdentity: 0
locationAreaIdentity.lac: 0
locationAreaIdentity.plmn.mcc: 0

the file is bigger but this is the idea. When I read the line I need to save the values in a variable and ignore the rest.

for example:

cellIdentity: 0

I need to read all the line but I just need to save the value 0 in a variable.
how can I do this???? :( please help me!!!!!!
Topic archived. No new replies allowed.