|
I'm a noobie and trying to make Hello World in visual studio 2003.
It says: error C2065: 'cout' : undeclared identifier.
Please help.
|
|
|
|
|
Put #include <iostream> at the top of your file
|
|
|
|
|
At the top of the source file, where you want to use cout:
#include <iostream.h>
Regards, mYkel
|
|
|
|
|
need to put #include "stdio.h" at head
|
|
|
|
|
Which does nothing for cout . stdio.h is for printf and related functions.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
#include <iostream>
using std::cout; <font color=green> Another poster suggested <iostream.h>, but that's obsolete, non-portable, and incompatible with the standard. Don't use it for new code.
|
|
|
|
|
I need to make some utility wich would be able to get basic information
about quick time (.mov) and real video movie files,
like length of movie in seconds, and whether it also contains audio track.
Does anybody know about some free lightwight library for this ?
Or some documents how to do this ?
Thanks
rrrado
|
|
|
|
|
Hi !
When I build my project I have a strange error (due to the linker):
....
....
Linking...
LINK : error : Internal error during EmitMap
ExceptionCode = C0000005
ExceptionFlags = 00000000
ExceptionAddress = 0043F8A4
NumberParameters = 00000002
ExceptionInformation[ 0] = 00000000
ExceptionInformation[ 1] = 01979104
CONTEXT:
Eax = AAAAAAAB Esp = 0012F8F4
Ebx = 7800F24D Ebp = 7800F24D
Ecx = 01979100 Esi = 3FFF0000
Edx = 400C2B44 Edi = 0000031D
Eip = 0043F8A4 EFlags = 00010206
SegCs = 0000001B SegDs = 00000023
SegSs = 00000023 SegEs = 00000023
SegFs = 00000038 SegGs = 00000000
Dr0 = 0012F8F4 Dr3 = 7800F24D
Dr1 = 7800F24D Dr6 = 01979100
Dr2 = 00000000 Dr7 = 00000000
Error executing link.exe.
Tool execution canceled by user.
But when I build again, this works fine.
Any idea ??
Thanks
|
|
|
|
|
I had such an error some years ago...
I overcloced my AMD K6 300 to 400MHz.
All Apps run just fine but during builds
I got some strange "Internal errors" Juts like
yours.
|
|
|
|
|
woah , your comipler is pretty messed up. its an internal error. the most dreaded error.
Toughest Steel Comes From Hottest Furnance
|
|
|
|
|
Hum hum... Yes ok but I hope this won't bring me a lot of problems
How can I fix this problem ??
|
|
|
|
|
Well first thing you can do is reinstall Visual Studio.
Toughest Steel Comes From Hottest Furnance
|
|
|
|
|
Actually, I think it's the linker.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hi there,
I'm experiencing problems disabling/graying menu items in the default menu added to an MFC application.
The following code to to check an item works but when I try to disable/gray a menu item (also shown below) the item is still enabled and not grayed (it doesn't change state):
<br />
CMenu *pMenu = GetMenu();<br />
pMenu->GetSubMenu(0)->CheckMenuItem(ID_FILE_NEW, MF_CHECKED);<br />
<br />
pMenu->GetSubMenu(0)->EnableMenuItem(ID_FILE_NEW, MF_GRAYED);
EnableMenuItem() returns 0 which, according to MSDN, means the previous state was MF_ENABLED.
Do any of you guys have an idea what might be causing this problem?
Thanks in advance!
|
|
|
|
|
Your code is working correctly, but the state of the menu item is being changed back to enabled by how MFC works. When a menu is about to be displayed, MFC will fire of a ON_UPDATE_COMMAND_UI handler for every item in the menu. If you handle this and disable the specific menu item in that handler, it will work OK. If you do not handle it, MFC will enable the menu item by default if a ON_COMMAND handler exists in the call tree for that item (i.e app/mainframe, doc or view).
So, you really need to enable/gray the item in the ON_UPDATE_COMMAND_UI handler for that specific menu item
Roger Allen - Sonork 100.10016
Roger Wright: Remember to buckle up, please, and encourage your friends to do the same. It's not just about saving your life, but saving the quality of life for those you may leave behind...
|
|
|
|
|
Thanks for your reply. It makes sense
Anyways, I saw the MSDN reference for the "CCmdUI* pCmdUI" parameter of the ON_UPDATE_COMMAND_UI handler function which looks like this:
<br />
void CFileDoc::OnUpdateFileSave(CCmdUI* pCmdUI) <br />
{<br />
pCmdUI->Enable(m_fModified);<br />
}<br />
In that code it looks like you need to keep track of whether to enable or disable the button.
Is that really so? I mean, would I really have to create new variables for each element I would like to be able to enable/disable later on to hold the current state?
|
|
|
|
|
I used profile tool in vc6 to ananlyse the performance of c/c++ code.
But I can't find it in vc7. How can we do profile in vc7? any other tools?
|
|
|
|
|
|
hy, im wondering, what in your opinion is best. or what are the differences?
i tryed to do something with the microsoft installer (the one from the studio.net) but it doesent work really. i cant configure launch conditions (i tryed 2hours..) and i cant run any c++ code or a .exe file BEFORE i run the setup. ist this possible at all with installer?
with installshield this is no problem!
|
|
|
|
|
The deployment project type in Visual Studio .NET is a pretty simple wrapper around the core Windows Installer technology. If you don't need anything complicated, it's great.
Otherwise, look at some other tool that wraps Windows Installer, such as a newer version of InstallShield or Wise for Windows Installer[^]. It's the same install engine, in the end, but these tools give you far more power than the VS.NET deployment project does. This power is at the expense of simplicity.
|
|
|
|
|
help for ina grid control
skpanda
|
|
|
|
|
Hi all..
How do i insert a slider control in the mainframe of an mfc application.
Bye
|
|
|
|
|
Put something like:
m_wndSlider.Create(TBS_HORZ | WS_VISIBLE, CRect(5, 100, 500, 150), this, 1234); in the OnCreate() method, where m_wndSlider is a CSliderCtrl object.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
How do i change the background color of the dialog and all the dialog items to different color as easyly as possible (programatically).
thank you,
Toughest Steel Comes From Hottest Furnance
|
|
|
|
|
SetSysColors() is the easiest way (but it will change the colors of all the dialogs on your system).
Otherwise, override CDialog::OnPaint() to paint the dialog background, and handle WM_CTLCOLOR for all the child controls.
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|