markwalker84
Programmer
Hi there.
Firstly:
I am using an XP machine running SP2.
I am using Microsoft Visual C++ 2005 Express Edition.
I am new to VC++ (have a base in C)
I click New -> Project -> CLR -> Windows Form Application
I use the template style files that VC++ gives me which include;
Form1.h
resource.h
stdafx.h
app.ico
app.rc
AssemblyInfo.cpp
"Project_Name".cpp
stdafx.cpp
ReadMe.txt
So - now that everyone knows where i am coming from hopefully i can ask a question more effectively
I am trying to continually read in 3 lines from a text file.
Text.1
Number.1
Number.1
Text.2
Number.2
Number.2
(...)
and then store each to an array
Text[] - should this be String, std::string, char Text[][].......??????
num_1[]
num_2[]
So far all the code i have written has been added to Form1.h in the form of event handlers, and also a small .h file which contains my definitions of the arrays i want to store this text file information into (as well as a couple of other variables).
I would then like to be able to use those stored array values at a later date - for example; outting the text value to a label, or using the numerical value on a slide bar - just anything really.
I simply cannot work out how to do this :-( I have googled for about 2 full working days now and nothing seems to work. I have been trying fin >> & InFile >> with the appropriate #include etc but consistantly get errors along the lines of;
LNK4248: unresolved typeref token (0100004D) .....
LNK2020: unresolved token "int * _bristles"
LNK2021: unresolved external symbol "int * _bristles"
( this confuses me as the variable "_bristles" is defined in my added header file as "int _bristles[]" )
If anyone can spill any light on this issue whatso ever i would be eternally grateful!
All the best
Mark
Firstly:
I am using an XP machine running SP2.
I am using Microsoft Visual C++ 2005 Express Edition.
I am new to VC++ (have a base in C)
I click New -> Project -> CLR -> Windows Form Application
I use the template style files that VC++ gives me which include;
Form1.h
resource.h
stdafx.h
app.ico
app.rc
AssemblyInfo.cpp
"Project_Name".cpp
stdafx.cpp
ReadMe.txt
So - now that everyone knows where i am coming from hopefully i can ask a question more effectively
I am trying to continually read in 3 lines from a text file.
Text.1
Number.1
Number.1
Text.2
Number.2
Number.2
(...)
and then store each to an array
Text[] - should this be String, std::string, char Text[][].......??????
num_1[]
num_2[]
So far all the code i have written has been added to Form1.h in the form of event handlers, and also a small .h file which contains my definitions of the arrays i want to store this text file information into (as well as a couple of other variables).
I would then like to be able to use those stored array values at a later date - for example; outting the text value to a label, or using the numerical value on a slide bar - just anything really.
I simply cannot work out how to do this :-( I have googled for about 2 full working days now and nothing seems to work. I have been trying fin >> & InFile >> with the appropriate #include etc but consistantly get errors along the lines of;
LNK4248: unresolved typeref token (0100004D) .....
LNK2020: unresolved token "int * _bristles"
LNK2021: unresolved external symbol "int * _bristles"
( this confuses me as the variable "_bristles" is defined in my added header file as "int _bristles[]" )
If anyone can spill any light on this issue whatso ever i would be eternally grateful!
All the best
Mark