|
Now that is a good quote!
It is the best description I have ever read about the difference between a programmer and a Software Engineer.
INTP
Every thing is relative...
|
|
|
|
|
Thanks for noticing. I think some people do not beleive there is a difference ...
That is why I kept it as the byline for quite awhile now.
People that start writing code immediately are programmers (or hackers), people that ask questions first are Software Engineers - Graham Shanks
|
|
|
|
|
I think it's related to LINT[^] which is a static C/C++ Analyser, to check for programming errors and other stuff like that.
might be to suppress error 740 when running lint on that file ( or next few lines ).
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Thanks, that helps. I had not heard of PC-lint before.
r
|
|
|
|
|
Found the Lint error list if anyone is interested:
http://gimpel.com/html/pub80/msg.txt
Thanks to all who responded.
r
|
|
|
|
|
Hi!
I am using Visual Studio 2005 Standard.
I am having a hard time with below,
c:\program files\microsoft visual studio 8\vc\include\stdlib.h(406) : error C2381: 'exit' : redefinition; __declspec(noreturn) differs
1>c:\program files\microsoft visual studio 8\vc\include\gl\glut.h(146) : see declaration of 'exit'
Please help me!
Yonggoo
|
|
|
|
|
What do I use to see some output in the pane when the code is running in debug?
thanks,
sb
|
|
|
|
|
With Win32, use OutputDebugString() . With MFC, use TRACE() .
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Thanks. I had forgotten what it was, and there was no simple way to google it
|
|
|
|
|
Can't you use OutputDebugStr()? Try the TRACE macro also.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
|
|
|
|
|
I have given the following arguments to a program.
-i:Test_Data1.txt -i:Test_Data2.txt -o:Test_Data_Diff.txt
-c:"TOW:Udop:dN,0.2:vU,0.0005:L1P Sats:Slow nSat" -r:TOW -a:alertfile.txt
-i:Test_Data1.txt ....... This is the filename of first file
-i:Test_Data2.txt ....... This is the filename of Second file
My goal is to do the differences between both the files. I have 39 columns in both the files. I need to get the differences for only the columns i need.
so, i am giving the column names for which i want the differences as arguments i.e the following
-c:"Time:Salary:limit,0.2:age,25:Status:hours".
Suppose i declare two variables int argc, char *argv[]
i know that i would have "-" in argv[i][0], i/i/o/c/r/a in argv[i][1] etc
I want to take out 0.2 or 25 from this argument and store it in another varable. How can i do it?
c:"Time:Salary:limit,0.2:age,25:Status:hours".
the argument can also be like this.
c:"Time,0:Salary:limit:age,25:Status,1:hours".
I want to pick up the number which comes after the comma and store it in another variable. How is this possible?
|
|
|
|
|
I remember tackling the command-line-parsing problem back when i was in college. It was very challenging and also very rewarding. Years later when I started using Turbo C, I had a file, getopt.c, that I simply added to any project that needed this functionality. Now the function, in its various forms, can be found in several places on the Internet.
cuteee wrote: i know that i would have "-" in argv[i][0], i/i/o/c/r/a in argv[i][1] etc
Right.
argv[1] = -i:Test_Data1.txt
argv[2] = -i:Test_Data2.txt
argv[3] = -o:Test_Data_Diff.txt
argv[4] = -c:TOW:Udop:dN,0.2:vU,0.0005:L1P Sats:Slow nSat
argv[5] = -r:TOW
argv[6] = -a:alertfile.txt
cuteee wrote: I want to take out 0.2 or 25 from this argument and store it in another varable.
In your example, you'll need to parse argv[4] . Take everything between the first comma and the subsequent colon.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
I'm working on an application that can get to a serial/Usb port to communicate
with exturnal devices over a serial or Usb connection/session.
Could someone direct me, point me at the form and function.
I'm NOT looking to create a modem prorgam, but a function to
pass the required parameters from the main prog to an extrunal device
that recieves command string.
Thanks
Regards
Marc
Marc Andrews
mandrews@andrewsapplications.com
|
|
|
|
|
Use CreateFile("\\\\.\\COM1", ...) to open the port, and the send() /recv() pair to send and receive data.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: and the send()/recv() pair to send and receive data.
WriteFile() /ReadFile() ?
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Yes, thanks.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hi,
I need the IHttpNegotiate::BeginningTransaction() method to get called for all requests done by browser not only for request to main url.
Right now I have:
<br />
STDMETHODIMP CIEPlugin::Invoke(DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags,<br />
DISPPARAMS* pDispParams, VARIANT* pvarResult,<br />
EXCEPINFO* pExcepInfo, UINT* puArgErr)<br />
{ <br />
switch (dispidMember)<br />
{<br />
case DISPID_NAVIGATECOMPLETE2 : <br />
BSTR url;<br />
m_spWebBrowser2->get_LocationURL(&url);<br />
IStream *pstm;<br />
IMoniker* ppmk;<br />
CreateURLMoniker(NULL, url, &ppmk);<br />
IBindCtx *pbc;<br />
CreateAsyncBindCtx(0, this, NULL, &pbc);<br />
RegisterBindStatusCallback(pbc, this, NULL, 0); <br />
ppmk->BindToObject(pbc, NULL, IID_IStream,(void**)&pstm);<br />
break;<br />
}<br />
return S_OK;<br />
}<br />
and the BeginningTransaction method gets called only once.
<br />
HRESULT CIEPlugin::BeginningTransaction (LPCWSTR szURL, LPCWSTR szHeaders, DWORD dwReserved, LPWSTR *pszAdditionalHeaders)<br />
{<br />
MessageBox(NULL, bstr_t(szHeaders), "B", MB_OK);<br />
return S_OK;<br />
}<br />
Can onyone suggest how to make so that it gets called for any request done by broser, say request to css files loaded for a certain page or java script files or any other requests.
Thank in advace.
|
|
|
|
|
In my project, I need a textbox to mark something in client area. the textbox can dragged.
Thanks.
|
|
|
|
|
Ok. Are you looking for CreateWindow() to create the edit control, or are you wanting to know how to move (drag) a control?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
I only have experience to put a edit control on a dialog box. I do not know how to draw it in client area, and how to make it be able to dragged by mouse in client area.
Thanks.
|
|
|
|
|
xyhan wrote: I only have experience to put a edit control on a dialog box. I do not know how to draw it in client area...
The client area of a dialog is where the controls are located. Why do you think they are not one-in-the-same?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Make sense.I tried the following code in OnDraw(CDC *pDC) function:
CEdit textbox;
textbox.ShowWindow(SW_SHOW);
The running error indicates there is no valid window handler. I do not know why.
|
|
|
|
|
You have not actually created the underlying window.
CEdit *textbox = new CEdit();
textbox->Create(...);
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
OK,Thanks very much.
Now my question is: How to draw it in its parent window?
|
|
|
|
|
It's usually not a good idea for a control to draw in an area that it does not own. If a control needs to do this, the correct way is to send a message to the parent and let the parent take care of its own drawing.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|