![]() |
|
#1
|
|||
|
|||
storing a token pointer as a stringHello everyone,
New guy here. I've only just started learning C. I'm trying to write a program that tokenizes a string and then stores each token into a string (char[]). The token is a char pointer. Printing it to the screen without first dereferencing it is fine, as it displays the contents of its memory address. However, when I try to assign it to a string variable I get the error: error C2440: '=' : cannot convert from 'char' to 'char [9]' I'd appreciate any help. I've included my code below. The line with the error is in bold. CPP / C++ / C Code:
Thanks. |
|
#2
|
|||
|
|||
|
The problem is with this line:
CPP / C++ / C Code:
You've to loop through transDate to get the whole string to stick into the array. GF |
Recent GIDBlog
US Elections and the ?Voter?s Responsibility? by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Including Maps and strings?? | maddie | C++ Forum | 17 | 05-Jul-2004 07:25 |
| C++ Error that makes no sense! | ArcticTiger | C++ Forum | 1 | 10-Nov-2003 08:14 |
| convert long to pointer to char | realpopeye | C++ Forum | 2 | 26-Sep-2003 11:22 |
| string to double C++ | calculus87 | C++ Forum | 2 | 18-Sep-2003 12:50 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The