Search Results

Showing results 1 to 4 of 4
Search took 0.00 seconds.
Search: Posts Made By: venomxxl ; Forum: C++ and child forums
Forum: C++ Feb 17th, 2009
Replies: 7
Views: 473
Posted By venomxxl
I'll tell you how to get the strReverse() done. Since this is a home assignment I'll only tell you how you could do it.

First of all you need to decide whether you want to do it the string or char...
Forum: C++ Feb 17th, 2009
Replies: 7
Views: 473
Posted By venomxxl
Public is missing a colon, and get() method should look like this:
long get () const { return x; }

Why do you need set method to be const anyway?
Forum: C++ Jan 30th, 2009
Replies: 2
Views: 745
Posted By venomxxl
You can do this by passing a pointer to char or a string.

#include <string>
void yourFunction(const char * filename); //we don't want to modify so it's const
void yourFunction(string filename);
Forum: C++ Jan 30th, 2009
Replies: 3
Views: 263
Posted By venomxxl
You might want to try something like this, but yes it uses more CPU and memory.

#define YOUR_ARRAY_SIZE 256
#include <string.h>

char * getName(){
char buf[YOUR_ARRAY_SIZE];
...
Showing results 1 to 4 of 4

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC