|
didn't know that...
i changed it into vectors
thanks for the info
|
|
|
|
|
Should be #include <string> not #include <string.h> - STL header files don't end in ".h". Another issue is the printf ("%s", Plain_Text); . If you must use printf it should look like this: printf ("%s", Plain_Text.c_str()); . But using printf is a bad idea. Instead do this: cout << Plain_Text; . You may need to add an #include <iostream> for cout .
Steve
|
|
|
|
|
Hey Stephen Hewitt you are right:: printf ("%s", Plain_Text.c_str()); with include <string> works fine thanks
but cout<<plain_text gives="" error="" in="" compiling
the="" error:::
c:\documents="" and="" settings\antonis\my="" documents\parser\otinane.cpp(80)="" :="" c2679:="" binary="" '<<'="" no="" operator="" defined="" which="" takes="" a="" right-hand="" operand="" of="" type="" 'class="" std::basic_string<char,struct="" std::char_traits<char="">,class std::allocator<char> >'
(or there is no acceptable conversion)
I thought i was allowed to cout<< strings because i see it everywhere used
any ideas why i get error?
Thanks again for solving my problem
|
|
|
|
|
Have you included <iostream> ? Get rid of any ".h" CRT headers you're including. printf isn't type safe, as you've found the hard way - God knows how much wasted time has been spent in the programming world tracking down obscure bugs caused by, for example, a mismatch in the format string and the parameters.
Steve
|
|
|
|
|
God u are so right again i have to loose the .h from the include
Thanks man ur the best.
I wonder why they teach us wrong things in college u should become a teacher
thanks
so u sugest i use cout instead of prinf?
|
|
|
|
|
Yeah, I'd use cout instead of printf - Try as you will you won't get cout to crash as printf did. It will either work or not compile.
Steve
|
|
|
|
|
Hey thanks a lot i'll use cout as well
Thanks for helping me again
Talk to u again on the next post
|
|
|
|
|
when you remove the .h and use the stl form,
always use using namespace std;
VuNic
|
|
|
|
|
I tried to include atlimage.h in my project but i failed (i have VC++ 6)
and i didn't found where to download this lib .
slouma
|
|
|
|
|
|
when building
ERROR: enable to include altimage.h
slouma
|
|
|
|
|
elabed.slim wrote: enable to include altimage.h
you meant "unable", didn't you ?! :->
|
|
|
|
|
atlimage.h comes with visual studio .NET not VC6
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
I use atlImgae.h and it's not problem
in the visual studio .NET
But if you want to read jpg or bmp files use OleLoadPicture
|
|
|
|
|
Hi,
I have developed a program in which i intall a WH_CBT. But as soon as the code for installing the hook executes, the taskbar of my computer disappears and my computer halts.
Please give me any idea why this is so...
|
|
|
|
|
You must call CallNextHookEx after you finish processing the hook information.
From MSDN:
Calling CallNextHookEx is optional, but it is highly recommended; otherwise, other applications that have installed hooks will not receive hook notifications and may behave incorrectly as a result. You should call CallNextHookEx unless you absolutely need to prevent the notification from being seen by other applications.
Nibu thomas
Software Developer
|
|
|
|
|
Here's my theory:
You are installing a global hook; that is you called SetWindowsHookEx with the hMod non NULL and the dwThreadId parameter equal to zero. This causes the dll identified by hMod to be injected in all processes with message pumps; this is how global hooks work. Your DLL contains a bug and this buggy code has been injected into explorer via the global hook. Do you really need a global hook?
Steve
|
|
|
|
|
I have put this code in button click event;
but notting happens as the button is pressed.
it should display the string on desktop.
CWnd wnd;
char str[] = "Test String";
wnd.m_hWnd = (GetDesktopWindow())->m_hWnd;
CDC* dc = wnd.GetDC();
dc->TextOut(100,100,str);
An alternate which I have also tried is
CString str = "Test String";
((GetDesktopWindow())->GetDC())->TextOut(100,100,str);
but no result.
Thanks in advance.
|
|
|
|
|
Use GetWindowDC();
Nibu thomas
Software Developer
|
|
|
|
|
I am currently using rtx for some application and i obtained this warning after i editted some of the settings. I think the /DRIVER setting is required by rtx, but i dont see where the /EDITANDCONTINUE come from.
Does anyone know how to solve this warning ?
LINK : warning LNK4075: ignoring /EDITANDCONTINUE due to /DRIVER specification
I am currently using VC 6 and apparently /INCREMENTAL:NO is required for this application...
-- modified at 4:34 Thursday 9th March, 2006
|
|
|
|
|
I came across the following window message codes sent to WndProc of the main form of a C# application. These messages are generated when the form starts up. There are no published WM_ constants for these. Does anyone have an idea what they represent?
UNKNOWN: 297 (H129)
UNKNOWN: 295 (H127)
|
|
|
|
|
Try the C# Forum[^]
might get a better response there
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
Please reply ASAP
I am unable to change the bitmap at runtine.
Ashok Reddy
|
|
|
|
|
Use a CBitmapButton .
Nibu thomas
Software Developer
|
|
|
|
|