Click here to Skip to main content
15,891,033 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to achieve a secure file system against information leak? Pin
zymoonstone21-Feb-05 13:54
zymoonstone21-Feb-05 13:54 
QuestionConnected or not? Pin
wasife20-Feb-05 18:58
wasife20-Feb-05 18:58 
AnswerRe: Connected or not? Pin
ThatsAlok20-Feb-05 19:11
ThatsAlok20-Feb-05 19:11 
AnswerRe: Connected or not? Pin
David Crow21-Feb-05 4:10
David Crow21-Feb-05 4:10 
AnswerRe: Connected or not? Pin
Michael Dunn21-Feb-05 6:58
sitebuilderMichael Dunn21-Feb-05 6:58 
GeneralTitle bar Color Pin
Anonymous20-Feb-05 18:54
Anonymous20-Feb-05 18:54 
QuestionHow to fix first four coumns of the List ctrl and all other columns to allow scrolling Pin
sureshpillai20-Feb-05 18:40
sureshpillai20-Feb-05 18:40 
GeneralPassing values of object. Getting garbage. Pin
macrophobia20-Feb-05 18:25
macrophobia20-Feb-05 18:25 
Im trying to pass the values of an object, plus a few other numbers. TEXT OUTPUT ATTACHED BELOW Im sure it's something Im doing wrong. Dead | X|

The function:

void dataOut(std::string foodName, int Calor, double wtr, double prt,<br />
double fat,double carb,double fib,double vita,double vitb,double vitc,double calci)

...followed by some commands for sending values to a text file. Im using std::ofstream and std::fstream .(working)

The function call:

dataOut(breadobject.strFileName,breadobject.intCalor,<br />
2.2,0.0,breadobject.dblFat,breadobject.dblCarb, breadobject.dblFiber,0.0,0.0,0.0,0.0);


The text output to the file:

Food: White Slice
Calories: 0
Water (oz): 2.2
Protein: 0
Fat: -9.25596e+061
Carbohydrates: -9.25596e+061
Fiber: -9.25596e+061
Vitamin A: 0
Vitamin B: 0
Vitamin C: 0
Calcium: 0


My observations:

The name of the food (breadobject.strFileName) is correctly being received by the function, but the numeric values (i.e. breadobject.intCalor, breadobject.dblFat) are not. Any explicit double values that I send are coming through ok too.

Ok. This should be an easy one for you geniuses! Poke tongue | ;-P

Thanks in advance.

Travis
GeneralRe: Passing values of object. Getting garbage. Pin
David Nash20-Feb-05 22:02
David Nash20-Feb-05 22:02 
GeneralRe: Passing values of object. Getting garbage. Pin
macrophobia20-Feb-05 23:43
macrophobia20-Feb-05 23:43 
GeneralRe: Passing values of object. Getting garbage. Pin
David Nash21-Feb-05 3:10
David Nash21-Feb-05 3:10 
GeneralUPDATE - Passing values.Getting garbage. Pin
macrophobia21-Feb-05 2:01
macrophobia21-Feb-05 2:01 
GeneralRe: UPDATE - Passing values.Getting garbage. Pin
David Nash21-Feb-05 3:32
David Nash21-Feb-05 3:32 
GeneralRe: UPDATE - Passing values.Getting garbage. Pin
David Nash21-Feb-05 12:19
David Nash21-Feb-05 12:19 
GeneralRe: UPDATE - Passing values.Getting garbage. Pin
macrophobia21-Feb-05 15:44
macrophobia21-Feb-05 15:44 
GeneralRe: UPDATE - Passing values.Getting garbage. Pin
macrophobia21-Feb-05 16:25
macrophobia21-Feb-05 16:25 
GeneralRe: UPDATE - One final suggestion Pin
David Nash22-Feb-05 2:31
David Nash22-Feb-05 2:31 
GeneralInsert a dialog in MDI!! Pin
20-Feb-05 18:12
suss20-Feb-05 18:12 
GeneralRe: Insert a dialog in MDI!! Pin
Aamir Butt20-Feb-05 22:06
Aamir Butt20-Feb-05 22:06 
GeneralRe: Insert a dialog in MDI!! Pin
Maximilien21-Feb-05 0:30
Maximilien21-Feb-05 0:30 
GeneralEnabling HotKeys in an MFC based application Pin
PrashantJ20-Feb-05 17:47
PrashantJ20-Feb-05 17:47 
GeneralRe: Enabling HotKeys in an MFC based application Pin
ThatsAlok20-Feb-05 19:10
ThatsAlok20-Feb-05 19:10 
GeneralRe: Enabling HotKeys in an MFC based application Pin
22491720-Feb-05 19:37
22491720-Feb-05 19:37 
GeneralA Simple Problem Pin
SeanSheehan20-Feb-05 17:46
SeanSheehan20-Feb-05 17:46 
GeneralRe: A Simple Problem Pin
22491720-Feb-05 18:32
22491720-Feb-05 18:32 

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.