Click here to Skip to main content
       

C / C++ / MFC

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
GeneralRe: error C2678: binary '='memberChris Meech13 Dec '12 - 9:06 
Try this.
Passenger::Passenger()
{
}
 
This ctor for Passenger is used by the Reservation class. Smile | :)
Chris Meech
I am Canadian. [heard in a local bar]
 
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
 
posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]

GeneralRe: error C2678: binary '='memberalaaan7313 Dec '12 - 9:24 
its WORK Big Grin | :-D
but it seems i will have infinite No. of errors
when i got the last error i got another LNK2019 error with it, but i thought if i solve one of them the other will be solved also , and my thoughts was wrong
 
this is the other error :
1>Reservation.obj : error LNK2019: unresolved external symbol "public: class std::basic_string,class std::allocator > __thiscall Reservation::ID_sn(void)" (?ID_sn@Reservation@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) referenced in function "public: class std::basic_string,class std::allocator > __thiscall Reservation::getReservationNumber(void)" (?getReservationNumber@Reservation@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
GeneralRe: error C2678: binary '='memberFreak3014 Dec '12 - 0:48 
This time you get the error because you didn't define the funtion ID_sn().
 
I would just create a local std::string, assign to that one in line 44 and return it at the end.
AnswerRe: error C2678: binary '='mvpRichard MacCutchan13 Dec '12 - 7:33 
You defined ID as const.
 
Also your <pre> tags are being ignored, have a look at the setting of the Treat my content as plain text, not as HTML checkbox, at the bottom of this page and/or in your settings page.
One of these days I'm going to think of a really clever signature.

GeneralRe: error C2678: binary '='memberalaaan7313 Dec '12 - 7:55 
i cant change anything in the header file
all my work will be on the source file only
Questionprocessmembermessages13 Dec '12 - 3:45 
Hi everyone
I have three questions
1.why do I need to use of TEXT macro in my codes and if I remove it compiler shows error
2.why CreateProcess cant open test.txt while second parameter is command line and I have to write full path ("c:\\notepad.exe c:\\1.txt")
3.Do I need to use of WaitForSingleObject
STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof (STARTUPINFO);
GetStartupInfo (&si);
si.dwFlags = STARTF_USESHOWWINDOW |STARTF_TITLEISAPPID ;
si.wShowWindow = SW_SHOWMAXIMIZED;
si.lpTitle=TEXT("Test");
if(CreateProcess(TEXT("c:\\notepad.exe"),TEXT("c:\\test.txt"),NULL,
NULL,FALSE,NULL,NULL,NULL,&si,&pi))
{
//WaitForSingleObject(pi.hProcess, INFINITE);
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
}
 
Thanks
AnswerRe: processmemberDavidCrow13 Dec '12 - 4:14 
messages wrote:

1.why do I need to use of TEXT macro in my codes and if I remove it compiler shows error
See here.
 
messages wrote:

2.why CreateProcess cant open test.txt while second parameter is command line and I have to write full path ("c:\\notepad.exe c:\\1.txt")
Do you understand the difference between absolute vs. relative paths?
 
messages wrote:
3.Do I need to use of WaitForSingleObject
Only if you need to wait.

"One man's wage rise is another man's price increase." - Harold Wilson

"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous


GeneralRe: processmembermessages13 Dec '12 - 4:18 
Do you know your answers are great?
Thanks
Questionexporting data from C++ to Cmemberdanielsutopo12 Dec '12 - 15:00 
Hi
I have to program, one is in c++ I have compiled with VStudio 2010, and one in c compiled in gcc.
 
In c program, I need data which come from c++.
how to export data from c++ to C? does any one have the sample code for this one?
 
thankyou
AnswerRe: exporting data from C++ to CmvpRichard MacCutchan12 Dec '12 - 22:35 
Data is data, it has nothing to do with what language is used to process it. Please try and explain your problem in more detail.
One of these days I'm going to think of a really clever signature.

GeneralRe: exporting data from C++ to Cmemberdanielsutopo15 Dec '12 - 13:45 
I have a program in C++ compile with Visual Studio 2010. This program is to get data from joystick, this joystick will control robot in server pc.
in this client PC I have udp client server in C compile with gcc.
 
I need to pass data from joystick program to udp client program.
 
How can I do that? data is in char format, and input udp have the same format.
 
are there any source code example to do that?
GeneralRe: exporting data from C++ to CmvpRichard MacCutchan15 Dec '12 - 20:59 
Make a socket connection and send the data, suitably formatted, to your client. I don't understand what the problem is here, transferring data between clients and servers is how the entire world is run these days.
One of these days I'm going to think of a really clever signature.

GeneralRe: exporting data from C++ to Cmemberdanielsutopo16 Dec '12 - 11:50 
I have udp server client connection it is in C program, but the problem is, that my joystick program in client is in C++, I want to pass C++ data to client C program.
 
thank you
GeneralRe: exporting data from C++ to CmvpRichard MacCutchan16 Dec '12 - 21:47 
There is no such thing as "C++ data", data is data, it's just a series of bytes. I cannot see how you are able to write C and C++ code and, apparently, understand UDP client/server, and yet do not understand this basic concept.
One of these days I'm going to think of a really clever signature.

AnswerRe: exporting data from C++ to CmemberAlbert Holguin13 Dec '12 - 5:26 
You need to read up on Interprocess Communications... and choose one that fits what you need most appropriately according to whether you expect the programs to be on the same machine, speed, reliability, platform dependence (or independence).
 
http://en.wikipedia.org/wiki/Inter-process_communication[^]
http://msdn.microsoft.com/en-us/library/windows/desktop/aa365574%28v=vs.85%29.aspx[^]
QuestionOverlaying Text over VideomemberSrivathsanRaghavan11 Dec '12 - 19:25 
Hi all,
 
Can any one tell me How to overlay text over a video available, using Linux Commands.
 
I have tried with ffmepg tool, But I can't able to make it possible.
 
The Command I used was,
 
ffmpeg -i Input.avi   drawtext="fontfile=/usr/share/fonts/truetype/freefont/FreeSans.ttf:text=HelloWorld:fontcolor=red@1.0:fontsize=70:x=00: y=40" -y Output.avi
 

 
An Error Message i got:
 
Unable to find a suitable output format for 'drawtext=fontfile=/usr/share/fonts/truetype/freefont/FreeSans.ttf:text=HelloWorld:fontcolor=red@1.0:fontsize=70:x=00: y=40'
 

Please let me know, How to work it out or some other Linux tool to overlay a text over Video.
 
Expecting for the best reply soon
 
Thanks & Regards
Srivathsan.K.R
AnswerRe: Overlaying Text over VideomvpRichard MacCutchan11 Dec '12 - 21:05 
This is the C++ forum please try elsewhere.
One of these days I'm going to think of a really clever signature.

Questionerror C2065: 'xlSheetVisible' undeclaredmemberForNow11 Dec '12 - 10:18 
Looking at the documentation xlSheetVisible property
 
Assembly: Microsoft.Office.Tools.Excel (in microsoft.office.tools.excel.dll)
 

does this mean this property is exposed in excel.dll if so I only have the executable
 
thanks
QuestionRe: error C2065: 'xlSheetVisible' undeclaredmvpRichard MacCutchan11 Dec '12 - 11:12 
Confused | :confused:
One of these days I'm going to think of a really clever signature.

AnswerRe: error C2065: 'xlSheetVisible' undeclaredmemberForNow11 Dec '12 - 11:19 
I am thinking I have to have some dll where this
Method is exposed
GeneralRe: error C2065: 'xlSheetVisible' undeclaredmvpRichard MacCutchan11 Dec '12 - 11:25 
Yes, and you already showed that information in your original question; it is part of the Office interop. However, you need Microsoft Office installed on your system in order to access it. What exactly are you trying to do, and is this really a C++ question?
One of these days I'm going to think of a really clever signature.

GeneralRe: error C2065: 'xlSheetVisible' undeclaredmemberForNow11 Dec '12 - 11:41 
OLE programming and since at work I cannt down load anything I want I am guessing what I am looking for is in nativeexcel.dll
 
The only thing I have on my machine is excel.exe
GeneralRe: error C2065: 'xlSheetVisible' undeclaredmvpRichard MacCutchan11 Dec '12 - 11:48 
ForNow wrote:
The only thing I have on my machine is excel.exe
Then you should have the required DLL's also. Have a look here[^] for some suggestions.
One of these days I'm going to think of a really clever signature.

QuestionVC++6.0 menu limit?memberMember 70817211 Dec '12 - 7:45 
Hi ALL!
VC++6.0, XP SP3, MFC Dialog-based App.
Adding a next item to the menu I've suddenly got a message "Out of memory. Unable to complete command". After restart it's impossible to load project clicking .DSW file: workspace stays empty, no files loaded.
 
Killing of the .CLW solves the problem for an one session. After I restart project, it again doesn't work, need delete .CLW again.
 
Now, I cannot add a menu item. Currently there are about 1000 items in the menu. I have a bad suspicion that may be there is a LIMIT for the wizard when it adds a menu item?
 
Please, any ideas how to add items?
AnswerRe: VC++6.0 menu limit?mvpRichard MacCutchan11 Dec '12 - 9:32 
Member 708172 wrote:
Currently there are about 1000 items in the menu.
Seriously? How do you expect anyone to navigate such a maze? You should rethink your design.
One of these days I'm going to think of a really clever signature.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web04 | 2.6.130516.1 | Last Updated 21 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid