Hi,
I have the basic pointers stuff down but have trouble passing the pointer to a string to a function which then passes it to another function for editing, both functions then return and the change should be displyed in a message box.
Code:
void FirstFunction(char **first);
void SecondFunction(char *second);
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
char *szText= "The Text Has Not Changed";
FirstFunction(&szText);
MessageBox(NULL, szText, "Note:", MB_OK | MB_ICONINFORMATION);
return 0;
}
void FirstFunction(char **first)
{
strcpy(*first, "Text Half Changed");
MessageBox(NULL, *first, "Info", MB_OK | MB_ICONINFORMATION);
SecondFunction(*first);
}
void SecondFunction(char *second)
{
strcpy(second, "The Text Has Changed);
}
Is there a good tutorial that someone could reccomend? I have looked all over and can only find stuff on passing a pointer to a function once.\
Thanks