Gotta learn FMOD For school project.
In the code (copied from the documentation):
FMOD_RESULT result;
FMOD::System *system;
result = FMOD::System_Create(&system); // Create the main system object.
if (result != FMOD_OK)
{
printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result));
exit(-1);
}
result = system->init(100, FMOD_INIT_NORMAL, 0); // Initialize FMOD.
if (result != FMOD_OK)
{
printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result));
exit(-1);
}
What does the second line do (FMOD::System *system;)? What does the next line do (result = FMOD::System_Create(&system);)?
I think the line FMOD::System *system; creates a pointer and the other line creates the system and checks for errors. I just don't get the need for pointers.
Could someone please explain Thank-you