It finally works...thanks!! :)
Type: Posts; User: ProjectsProject
It finally works...thanks!! :)
Swoopy,
Thanks again for all your help, but I seem to be up against a wall here. My program does not seem to recognize the "General" section and has an error reading val1 and val2. Can you...
Hey swoopy,
I tried your suggestion and unfortunately, it still does not work. Any other ideas?
Yes. It looks like this:
[General]
val1=1
val2=1
Thanks, that did the trick!
Now that it's compiling, it does not seem to find the key name in the ini file (val1 or val2). GetPrivateProfileInt is just returning the default values that I put...
OK...I'm trying something different now. The switch statement was not working for me. Looking through this forum, I found the GetPrivateProfileInt function and decided to try it instead. Here's...
Thanks Quzah. I changed "Variable" into "LineRead" and from a char to an int.
As for the rest of your suggestions, do you think that the fscanf statement is the problem with my case expression? ...
Hello,
I am trying to use a switch statement to read data from a text file. Text File is laid out as follows:
val1=1
val2=2
...
string1=help
Thanks for your help!
Hello,
Just a quick question; I need a little help with fscanf.
How would you read the following line of text into a program?
4011900,"4-1.19",4.00,"01S, B19","01S, BA3T","A","0","0"...
Hello,
How do I use ini files to read constants into my program? The ini file is written as follows:
[CONSTANTS]
Number_of_Integers = 4
FileName = OpenFile.txt
Thanks for the replies, but I guess that wasn't exactly what I was looking for. Let me try again...
What specific code could be used to ignore commas and parentheses?
Also, what code could...
So, I have posted here before and you have all been a great help. My problem is that I am still a really bad programmer. :)
I am attempting to read in data from a text file and have a couple...
Thanks...that did the trick!!
Hello All,
I am trying to read in a text file with the following format:
<int1>,<char1>,<char2>,<char3>,<char4>,<int2>
All data is seperated by a comma. Once I have the data, I am trying...
Does somebody know what the following error could mean?
'readConductorFile.exe': Loaded 'C:\WINNT\system32\NTDLL.DLL', Cannot find or open a required DBG file.
'readConductorFile.exe': Loaded...
Would it make a difference if the file was in the following format instead?
344,"8-28.17","8-28.15","750MCM","No rating",0
345,"8-28.17","8-28.16","477AL","No cable rating.",0...
Yes, the file appears as posted.
:(
I am still having difficulty with this read file thing. I tried all the suggestions in this thread, but nothing seems to work. So, I'll try explaining the problem again:
What I am trying...
Thanks for your comments...it seems that it's always some small reason why the program doesn't compile (like missing a "}" in this case).
Now that it has compiled, it still doesn't seem to work....
Add the following line into your code before "return 0;"
cin.ignore();
Again guys, I can't thank you enough for your help. I tried to modify my original code to real a random access file as follows:
// Reading data from a text file exported from Access
...
Thanks for your help, but this still does not do anything. I am starting to wonder if there is something wrong with the txt file. Basically, this is the content and format of the txt file:
...
Hey,
First of all, I am not a great programmer and lately I have not been having the best of luck getting my code to work (go figure!). Hopefully one of you will be able to help me out...
I...