Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
2
Posts with Upvotes
2
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
~3K People Reached
Favorite Forums
Favorite Tags
c++ x 11
c x 2
Member Avatar for MacLeopard

Is there some sort of wildcard search function in C? Detailed explanation.  [code]Phrase: <blah="*" uid="ekdopakek"> So let's just say we've got this 48764546545blah<blah="whatever" uid="ekdopakek">blahblahblah I'm looking for a function that will return the whatever, and just the whatever (nothing else). Thanks![/code]

Member Avatar for Ancient Dragon
0
853
Member Avatar for saishn

[code] #include <iostream> using std::cout; using std::endl; class aClass { public: aClass() { this->aString = new char [1];; this->aString[0] = '\0'; this->length = 0; } ~aClass() { cout << "Destructor" << endl; delete [] this->aString; } aClass(const char *); const aClass& aClass::operator=(aClass &); private: int length; char * aString; }; …

Member Avatar for saishn
1
106
Member Avatar for saishn

Again, I don't know what I've done wrong. [code] #include <iostream> using std::cout; using std::endl; #include <cstring> using std::strcpy; using std::strcat; #include <cstdio> using std::sprintf; void destroyMultiCharArray(char * * anArray, int size) { for (int i = 0; i < size; i++) { delete [] anArray[ i ]; } delete …

Member Avatar for saishn
0
301
Member Avatar for saishn

[code] #include <iostream> using std::cout; using std::endl; #include <cstring> using std::strcpy; using std::strcat; #include <cstdio> using std::sprintf; int main() { char * lb = "(?:[a-z90](?:-?[a-z90]+)+)"; int lbLen = strlen(lb); char * sbFrmat = "(?:%s(?:\\.%s){0,4})"; int sbFrmatLen = strlen(sbFrmat); int sbLen = (lbLen * 2) + sbFrmatLen; char sb[sbLen+1]; sprintf(sb, sbFrmat, …

Member Avatar for Ancient Dragon
0
238
Member Avatar for saishn

I get a segfault when I run the following. Seems to fail at strcpy. [code] #include <cstring> using std::strcpy; int main() { char * word = "word"; strcpy(word, "what"); } [/code] If I change char * word to char word[], it's fine. I thought that both declarations effectively do the …

Member Avatar for saishn
0
1K