For those new to message boards please try to follow a few simple rules when posting your question.
Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Keep the subject line brief, but descriptive. eg "File Serialization problem"
Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode HTML tags when pasting" checkbox before pasting anything inside the PRE block, and make sure "Ignore HTML tags in this message" check box is unchecked.
Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
Please do not post links to your question in one forum from another, unrelated forum (such as the lounge). It will be deleted.
Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
No advertising or soliciting.
We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
Hey guys, I am kind of new with C++. I have an assignment to do which is similar to this one:
My problems are how to read I/O files and how to actually DO this program. I am really lost with it.
This is not my homework, as u can see this link is from 2007. That is why I posted instead of my homework. I need assistance, so I will be able to solve my homework. If you can post something/link that may help me I will appreciate. Otherwise thank you, but I do know about my responsibilities as a student.
I have a need for creating a class template and you may help me.
 Multiple coclasses will be implemented in a single dll.
 Each coclass will implement the same interfaces but will have different class/clsid/resid.
 It is necessary to create a class template taking clsid/resid as its template paramemters.
 Finally, I need to use template classes for CoCreateInstance.
The problem is that I need to create many coclasses now and in the future.
I don't want to copy/paste for all of them because it is quite hard to maintain the source code for all the copy/paste'd coclasses. It is quite error-prone.
So, I definitely would like to create a class template.
Below, I created a class template and it compiled ok.
class ATL_NO_VTABLE CComT
: public CComObjectRootEx,
, public CComCoClass, &CLSID_T>
, public IDispatchImpl
I'm trying to compile a c++ project on a raspberry pi using g++. I get the following compilation error:
PROCESS.CPP: In function ‘int process(int, char*, ControlData*, char*, char*)’:
PROCESS.CPP:172:49: error: ‘_fullpath’ was not declared in this scope
PROCESS.CPP:185:45: error: ‘_fullpath’ was not declared in this scope
The file PROCESS.CPP has the header
which I thought should contain this declaration. I have checked the header path using the g++ -H command and it gives /usr/include/stdlib.h so I presume it is finding the file.
I don't want to start fiddling with my own declarations within the scope as there are many other files to include in this project.
_fullpath is a Microsoft specific library function that does not exist on Unix systems. You may use the realpath[^] function instead.
Because pathes are different on Unix and MS operating systems, the function call can't be simply replaced. I assume that you are tyring to compile some source that has been originally written for a Microsoft OS. You have to analyse the code and rewrite it to get similar behaviour on your Pi.
The underscore is a clue because it is not used with Unix libraries (at least the common ones). To get the description for standard library functions on your Pi just type "man ". I was quite sure that fullpath does not exist and checked it this way.
I have one query. I want to get the Login and Logout Time of a user. I want to get the time when user login to a pc, lock the PC, Logout (shutdown) the PC. I want to keep track of the Login / logout / Locking time of the user. Is there any class or any code available in C++ / MFC.
I have one query again. this function gives the Last logon and Logoff time in the number of seconds that have elapsed since 00:00:00, January 1, 1970, GMT. How can I get the correct value in Time format.
Also I want to get the record of user logon and logoff time for each day. Should I use the same function.?