| | |
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 |
Tag cloud for C++
api application array arrays assignment beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete developer display dll dynamiccharacterarray email encryption error file format forms fstream function functions game generator getline givemetehcodez graph iamthwee ifstream image input int java lib loop looping loops map math matrix memory multidimensional multiple newbie news node number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg sort sorting string strings struct template templates text tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets





