ATTENTIONThis FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices. |
flexsim.com |
#1
|
||||
|
||||
realtime()
Hi there,
I have a user command which I toogled to c++. The code contains the realtiem(12); command. The compiler is complaining about this command in c++. It says it is a unsinged int and not a string returned by the realtime command?
__________________
kind regards Nico. |
#2
|
|||
|
|||
Hi Nico,
I can confirm that the realtime() is only not returning string when you have switched to C++. If you test this code as a User Command: Code:
string str; time_t now = time(0); tm* localtm = localtime(&now); str=asctime(localtm); pt(str); pr(); time_t, localtime, and asctime is part of C/C++ time.h Lars-Olof |
The Following User Says Thank You to Lars-Olof Leven For This Useful Post: | ||
Nico Zahn (02-23-2009) |