Forum: C++ Nov 30th, 2006 |
| Replies: 3 Views: 1,061 lets say you have
char sMyString[6];
0 1 2 3 4 5
[A] [R] [R] [A] [Y] [\0]
you call delete_repeats ( sMyString, 0 );
so basically you want to delete A at position 3, but you... |
Forum: C++ Nov 30th, 2006 |
| Replies: 1 Views: 1,155 hash-map(or hash tables) are usually used for getting retrieval of records in O(n) time... something you'd see in a database design. vector is probably the quickest and simplest way to go:
- its... |
Forum: C++ Aug 30th, 2005 |
| Replies: 4 Views: 1,482 while defining the class is on the right track, you still need to create an object of that class (an instance of class dateReport)
your constructor for your class should initialize all data members... |
Forum: C++ Aug 18th, 2005 |
| Replies: 54 Views: 13,127 use your book and compare the syntax of what you wrote to examples in the book. if they look good, then do a dry run of your program on paper, write out each variable and what happens to its contents... |
Forum: C++ Aug 18th, 2005 |
| Replies: 8 Views: 1,475 read the file line by line, and parse each line and save it to your struct |
Forum: C++ Aug 18th, 2005 |
| Replies: 4 Views: 5,620 since get and getline write to a char*, just use atoi, for example
#include <stdlib.h>
int main(void)
{
char *buf1 = "42";
char buf2[] = "69.00";
int i;
double d;
... |