Posted by: sojodude August 3, 2005
Information technology
Login in to Rate this Post:     0       ?        
This works also: char* p; char* q; p = (char*)malloc(6); q = "abrde"; while(*p++=*q++); //P gets incremented char* x = &p[-6]; //I'd never used negative indexing in arrays but it works cout << "\nNew p is: " << x << "\n"; //Will print abrde
Read Full Discussion Thread for this article