list is undefined. Just because your type is char* doesn't mean it actually points to a valid memory location. Use something like

Code :

char* list = "dummy";

I doubt this code works on any other machine and the problem caused by glutInit() isn't a compile time error but a runtimeerror. If you get compiler errors, then the above error messages aren't the actual errors you wanted to show here.

You should brush up on your C/C++ knowledge before posting another question which has nothing to do whatsoever with OpenGL. Questions you might want to ask yourself:

- Do I know what a pointer is?
- Do I know what the value of an uninitialized pointer is?
- Do I know what "access violation" means?
- Do I know the difference between runtime and compile time?

list is undefined. Just because your type is char* doesn't mean it actually points to a valid memory location. Use something like

Code :

char* list = "dummy";

I doubt this code works on any other machine and the problem caused by glutInit() isn't a compile time error but a runtimeerror. If you get compiler errors, then the above error messages aren't the actual errors you wanted to show here.

You should brush up on your C/C++ knowledge before posting another question which has nothing to do whatsoever with OpenGL. Questions you might want to ask yourself:

- Do I know what a pointer is?
- Do I know what the value of an uninitialized pointer is?
- Do I know what "access violation" means?
- Do I know the difference between runtime and compile time?

Anyway, give us the compiler error, not the runtime error.

hmmm... interesting that my instructor would distribute the code with this error in it.

Pointers seems to be one of those things I have to relearn every couple months.

I'm thinking an access violation refers to accessing memory that has not been allocated by the program. The uninitialized pointer mustve been pointing to such a memory location.

And yeah I was confused about compile vs runtime errors in the visual studio environment, but the difference is clear now.

I will make sure my postings are graphics related in the future, assuming I can understand the nature of the problem in the first place lol