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]);