Altera_Forum
Honored Contributor
20 years agoglobal pointer assignment error
Nios 5.0.1
In global scope: char test[20]="teststring"; char *cp1 = &test[0]; //this works char *cp1; cp1 = &test[0]; //but this does not It all works inside a function, but not in global scope. Is this part of the anti-global variable campaign, or something I missed in my remedial C class?