Parkinmike
Programmer
Hi having a problem with some c++ I hope someone can help me becuase i need to get this sorted in my head quickly!
Basically I have a function, inside a public class that opens a wav file. then i have a main function which calls the function (and sends music.wav)
this is the code:
I am confused when i get to the line "bool openWavfile(char* fileName)"
From what i understand: this is a function called openWavefile, it returns bool type data.
It has an argument (char*fileName) and the argument is a pointer.
what i would like to know is: how does the pointer work? i guess that it doesnt give char fileName the value of c:\\music.wav.
Does it assign the the address in memory of C:\\music.wav or is it just a decleration of a pointer?
Im really stuck on this, its baffling me!
if you could either post here, or add me to MSN Parkin_m@hotmail.com if you dont mind having a quick chat with me...
PLease be quick!
Thanks
Michael
Basically I have a function, inside a public class that opens a wav file. then i have a main function which calls the function (and sends music.wav)
this is the code:
Code:
Public:
bool openWavfile(char* fileName)
{
//**does some stuff here**//
}
};
(void) main (void)
{
w.openWavfile("C:\\music.wav");
}
I am confused when i get to the line "bool openWavfile(char* fileName)"
From what i understand: this is a function called openWavefile, it returns bool type data.
It has an argument (char*fileName) and the argument is a pointer.
what i would like to know is: how does the pointer work? i guess that it doesnt give char fileName the value of c:\\music.wav.
Does it assign the the address in memory of C:\\music.wav or is it just a decleration of a pointer?
Im really stuck on this, its baffling me!
if you could either post here, or add me to MSN Parkin_m@hotmail.com if you dont mind having a quick chat with me...
PLease be quick!
Thanks
Michael