08. februar 2007 - 10:33Der er
8 kommentarer og 1 løsning
string operator men får fejl
er nyvebynder somc programmør ar lige e 2 fejl..
include <string>
using namespace std; string sPtr;
void main() { string *sPtr = new string("Syl"); *sPtr + = " Sta "; // its an array of character and its the content of the pointer with marked * cout<<*sPtr<<endl;
// c++ dont use garage collection therefore whenever we use new operator we have to add delete
#include <string> #include <iostream> using namespace std;
void main() { string *sPtr = new string("Syl"); *sPtr += " Sta "; // its an array of character and its the content of the pointer with marked * cout << *sPtr<<endl;
// c++ dont use garage collection therefore whenever we use new operator we have to add delete
#include <string> #include <iostream> using namespace std;
string sPtr;
void main() { string *sPtr = new string("Syl"); *sPtr + = " Sta "; // its an array of character and its the content of the pointer with marked * cout<<*sPtr<<endl;
// c++ dont use garage collection therefore whenever we use new operator we have to add delete
men et point overfoersels spoergsmaal er en mulighed
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.