Click here to Skip to main content
15,913,296 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: adding variables to a struct that were read in from a file Pin
Ryan Binns27-Jun-03 5:20
Ryan Binns27-Jun-03 5:20 
GeneralRe: adding variables to a struct that were read in from a file Pin
johnstonsk27-Jun-03 5:24
johnstonsk27-Jun-03 5:24 
GeneralRe: adding variables to a struct that were read in from a file Pin
Rage27-Jun-03 4:47
professionalRage27-Jun-03 4:47 
GeneralRe: adding variables to a struct that were read in from a file Pin
Ryan Binns27-Jun-03 4:59
Ryan Binns27-Jun-03 4:59 
GeneralRe: adding variables to a struct that were read in from a file Pin
John M. Drescher27-Jun-03 5:53
John M. Drescher27-Jun-03 5:53 
GeneralRe: adding variables to a struct that were read in from a file Pin
David Crow27-Jun-03 4:54
David Crow27-Jun-03 4:54 
GeneralRe: adding variables to a struct that were read in from a file Pin
johnstonsk27-Jun-03 5:18
johnstonsk27-Jun-03 5:18 
GeneralRe: adding variables to a struct that were read in from a file Pin
David Crow27-Jun-03 5:42
David Crow27-Jun-03 5:42 
This is not the recommended way to do what you are doing, but I just wanted to show you an alternative.

struct TSimSignal
{
    double Min;
    double Max;
    double Value; 
    char Name[32]; // CString or std::string would no doubt be better here
    char Unit[32];
} t[500]; // shouldn't be hard-coded

FILE *pFile;
for (int x = 0; ...)
{
    // should use parser (e.g., FSM) since sscanf is not fail-safe
    sscanf(pFile, "%[^,],%[^,],%f,%f,%f", t[x].Name, t[x].Unit, &(t[x].Min), &(t[x].Max), &(t[x].Value));
}

GeneralRe: adding variables to a struct that were read in from a file Pin
Ryan Binns27-Jun-03 4:56
Ryan Binns27-Jun-03 4:56 
GeneralRe: adding variables to a struct that were read in from a file Pin
johnstonsk27-Jun-03 5:24
johnstonsk27-Jun-03 5:24 
GeneralRe: adding variables to a struct that were read in from a file Pin
Ryan Binns27-Jun-03 13:48
Ryan Binns27-Jun-03 13:48 
GeneralAbout SetIcon Pin
olinn27-Jun-03 3:56
olinn27-Jun-03 3:56 
GeneralRe: About SetIcon Pin
Rage27-Jun-03 4:25
professionalRage27-Jun-03 4:25 
Generalup and down arrows in a string. Pin
mcgahanfl27-Jun-03 3:29
mcgahanfl27-Jun-03 3:29 
GeneralRe: up and down arrows in a string. Pin
basementman27-Jun-03 3:43
basementman27-Jun-03 3:43 
GeneralRe: up and down arrows in a string. Pin
mcgahanfl27-Jun-03 4:14
mcgahanfl27-Jun-03 4:14 
GeneralRe: up and down arrows in a string. Pin
basementman27-Jun-03 4:17
basementman27-Jun-03 4:17 
GeneralRe: up and down arrows in a string. Pin
mcgahanfl27-Jun-03 4:26
mcgahanfl27-Jun-03 4:26 
QuestionHow to set the text verticle center in CEdit Pin
Bosicat27-Jun-03 3:11
Bosicat27-Jun-03 3:11 
AnswerRe: How to set the text verticle center in CEdit Pin
Ryan Binns27-Jun-03 4:33
Ryan Binns27-Jun-03 4:33 
GeneralToolbar question Pin
User 988527-Jun-03 3:08
User 988527-Jun-03 3:08 
GeneralRe: Toolbar question Pin
Ryan Binns27-Jun-03 4:31
Ryan Binns27-Jun-03 4:31 
GeneralRe: Toolbar question Pin
User 988527-Jun-03 4:39
User 988527-Jun-03 4:39 
GeneralProblem while deriving from CList Pin
Charles Liu27-Jun-03 2:40
Charles Liu27-Jun-03 2:40 
Questionediting 24bit toolbar in editor??? Pin
schaereran@gmx.net27-Jun-03 2:39
schaereran@gmx.net27-Jun-03 2:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.