I am trying to create a simple string class, but i am getting a run time error. What i want to accomplish is to store a const char pointer to a char pointer. I am trying to use the strncpy function, i also tried the memcpy, but both gave the apparently the same error. The src argument is getting a value, however dst isn't, it says it's a bad pointer. I also tried using strcpy, but i can't allocate memory with malloc, it says that i can't assing void pointer to char pointer. This is my header: class MyString{ private: …

Member Avatar
Member Avatar
+0 forum 8

Hello. I am working on a data structures program that should be quite easy, but after programming in assembly language using mips, I forgot a little bit of C++ and can't remember how to do this. I've used my googlefu for at least 2 hours and still have this problem. The error: head undeclared, first use this function. The code it is talking about [CODE]void node::insertNode(int id, string name, double average,int *array) { node *newNode; //a new node node *nodePtr; // to traverse the list node *previousNode = NULL; //the previous node cout << "test 2"; //allocate a new node …

Member Avatar
Member Avatar
+0 forum 3

The End.