| | |
Unnecessary characters
Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Jul 2008
Posts: 46
Reputation:
Solved Threads: 0
Hi
I am using the code to get the current date
CTime aNow = CTime::GetCurrentTime();
char month[3];
char day[3];
char year[6];
char todaysdate[30];
itoa(aNow.GetMonth(), month, 10);
itoa(aNow.GetYear(), year, 10);
itoa(aNow.GetDay(), day, 10);
strcat(todaysdate,month);
I am getting value of month but apart from that I am also getting an unexpected character "He"
so My final output is
He 12
Why this extra He is coming.
Kindly advice
Regards
Karan
I am using the code to get the current date
CTime aNow = CTime::GetCurrentTime();
char month[3];
char day[3];
char year[6];
char todaysdate[30];
itoa(aNow.GetMonth(), month, 10);
itoa(aNow.GetYear(), year, 10);
itoa(aNow.GetDay(), day, 10);
strcat(todaysdate,month);
I am getting value of month but apart from that I am also getting an unexpected character "He"
so My final output is
He 12
Why this extra He is coming.
Kindly advice
Regards
Karan
![]() |
Similar Threads
- CODING QUESTION: What is the MOST importanting thing to do when...... (Computer Science)
- check if email address is correct without sending email? (PHP)
- Validating email with javascrip problem (JavaScript / DHTML / AJAX)
- Differences Between Java and C/C++ (C++)
- Generating an excel file. (PHP)
- Dictionary ADT (Computer Science)
- keeping a frequency of each character entered. (C)
- Converting without additional headers (C)
- Problem with filesharing on XP home (Windows NT / 2000 / XP)
- error checking of user input (C++)
Other Threads in the C++ Forum
- Previous Thread: C++ Help Needed
- Next Thread: exception handling
| Thread Tools | Search this Thread |
api array based binary bitmap c++ c/c++ calculator char char* class classes code coding compile console conversion count database delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int java lib linkedlist linker linux list loop looping loops map math matrix memory multiple news node number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings temperature template templates test text text-file tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets





