Click here to Skip to main content
16,004,927 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Copying Files -- On the Right Track? Pin
Ian Bowler13-Oct-04 11:47
Ian Bowler13-Oct-04 11:47 
Generalpointer question Pin
Anonymous13-Oct-04 8:22
Anonymous13-Oct-04 8:22 
GeneralRe: pointer question Pin
Budric B.13-Oct-04 8:34
Budric B.13-Oct-04 8:34 
GeneralRe: pointer question Pin
Anonymous13-Oct-04 8:45
Anonymous13-Oct-04 8:45 
GeneralRe: pointer question Pin
TFrancis13-Oct-04 8:58
TFrancis13-Oct-04 8:58 
GeneralRe: pointer question Pin
Budric B.13-Oct-04 9:00
Budric B.13-Oct-04 9:00 
GeneralRe: pointer question Pin
Tyrus18213-Oct-04 17:17
Tyrus18213-Oct-04 17:17 
GeneralRe: pointer question Pin
Anonymous13-Oct-04 17:21
Anonymous13-Oct-04 17:21 
main()
{

float val1 = 0.0;
float val2 = 0.0;
........
myfunc(&val1, &val2);

}

You need to allocate some memory for Val1 and Val2. What you did allocated memory for 2 variables that were capable of storing the memory address of Val1 and Val2, but not the values themselves.

For instance:
int i; //declares that i is an int and allocates memory
int *j; // declares that j can store a memory address to a location in memory that can store an
//integer - but note, no memory has been allocated for that integer here
j= &i; //assign j (capable of storing an address) the address of i (which in turn can store an int)

Hope this helps you....
GeneralRe: pointer question Pin
Henry miller14-Oct-04 2:31
Henry miller14-Oct-04 2:31 
GeneralC++/MFC tests Pin
BlackDice13-Oct-04 7:42
BlackDice13-Oct-04 7:42 
GeneralRe: C++/MFC tests Pin
David Crow13-Oct-04 10:35
David Crow13-Oct-04 10:35 
GeneralRe: C++/MFC tests Pin
BlackDice13-Oct-04 11:38
BlackDice13-Oct-04 11:38 
GeneralRe: C++/MFC tests Pin
David Crow14-Oct-04 2:10
David Crow14-Oct-04 2:10 
GeneralRe: C++/MFC tests Pin
BlackDice14-Oct-04 2:41
BlackDice14-Oct-04 2:41 
GeneralRe: C++/MFC tests Pin
Henry miller14-Oct-04 2:35
Henry miller14-Oct-04 2:35 
GeneralRe: C++/MFC tests Pin
BlackDice14-Oct-04 2:44
BlackDice14-Oct-04 2:44 
Questionhow to run your program in boot ? Pin
faroqtam13-Oct-04 6:41
faroqtam13-Oct-04 6:41 
AnswerRe: how to run your program in boot ? Pin
David Crow13-Oct-04 10:35
David Crow13-Oct-04 10:35 
QuestionMFC (VC 6.0 SP 6) asserts - missing Ole server ? Pin
Vaclav13-Oct-04 6:26
Vaclav13-Oct-04 6:26 
GeneralCredentialCache.DefaultCredentials equivalent in Win32/WinInet Pin
cheesepirate13-Oct-04 6:12
cheesepirate13-Oct-04 6:12 
GeneralDirectX programming Pin
jooo13-Oct-04 5:05
jooo13-Oct-04 5:05 
GeneralRe: DirectX programming Pin
Cedric Moonen13-Oct-04 20:30
Cedric Moonen13-Oct-04 20:30 
GeneralProgress Bar Control Pin
jooo13-Oct-04 4:53
jooo13-Oct-04 4:53 
GeneralRe: Progress Bar Control Pin
David Crow13-Oct-04 10:48
David Crow13-Oct-04 10:48 
GeneralRe: Progress Bar Control Pin
jooo13-Oct-04 15:41
jooo13-Oct-04 15:41 

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.