I have a very primitive question on C++. If I want include a library I use #include say, #include , iostream header file all I/O functions are declared. But Including a Standard C++ header does not introduce any library names into the current namespace. For that we have to use using namespace std; What does this mean? Does it mean in namespace std all the functions in standard library files are defined and that's why we need that?
Binayak
Posts
-
very basic C++ question -
.NET specific errorHi, I was trying to build an ATL VC++ program in .net 2003 and I keep getting LNK 2019 errors. In the MSDN I searched for that error and I found the following. Can anybody tell me where I can find _check_commonlanguageruntime_version function and where to put that? In Visual C++ .NET 2003, this error will be generated when /clr is used and the CRT is not linked into your executable. Any object code generated by the compiler that is not built with /clr:initialAppDomain contains a reference to the _check_commonlanguageruntime_version function, which is defined in the C Runtime Library (CRT). This function provides for an error message if your application is run on version 1 of the runtime. Code generated by the current compiler is not compatible with version 1 of the common language runtime. So, if you compile without the CRT in Visual C++ .NET 2003, you should include a definition of the _check_commonlanguageruntime_version function in your code. As an alternative to using the _check_commonlanguageruntime_version function, you can link with nochkclr.obj, which contains an empty version of the function and does not provide for an error message if you run your application on version 1 of the runtime. To build an application with the current compiler version to run on the previous version of the runtime, use /clr:InitialAppDomain.
-
_L errorI was trying to build a atl program in .net, I got this error error C3861: '_L': identifier not found, even with argument-dependent lookup on the line if( lstrcmpiW(szName, _L("Output")) == 0 ) .............. What should I use instead of _L ()?
-
how to use the resource file to store all strings?Hi, I would like to have all the UI strings in the resource file (including the strings for the messageboxes). How can I put them in the resource file and retrieve them? Thanks,
-
MFC questionsworked
SIZE sizeTotal; sizeTotal.cx= cx; sizeTotal.cy= cy; CScrollView::SetScaleToFitSize( sizeTotal);
-
MFC questionsI'm using a formview here, setscaletofitsize() is for the scrollview. can you please tell me how I can use it for the scroller in the formview?
-
MFC questionsIt worked. Thanks.... I have another similar question :-) I have two tree controls attached to the tabs in the tab control. To fit the tree control in the tab control what should I do? 'cause I can't write the wm_size handler for the tabcontrol as I'm adding the tree controls in the formview, not in the tabcontrol class.
-
MFC questionsI used following code Onsize but I'm getting asserting error at line 279 of winocc.cpp CFormView::OnSize(nType, cx, cy); CRect rectView; GetClientRect (&rectView); m_TabCtrl.MoveWindow (&rectView);
-
MFC questionsHi, 1. I have put a TabControl inside a formview in the MFC-SDI application. If I resize the window I want the tab control to always fit in the window (that means if I make the window bigger the control inside will become bigger and if I make the window smaller I want the control to get smaller). Please advise how I can do that? 2. How can I make a SDI application non-resizable? Thanks,
-
problem building with .net 2003Hi, I can build my program (atl ) using visual 6.0. But if I try to build with .net2003 I get the following errors. I think it has something to do with the library file settings. Please advise. HelloHierarchy.obj : error LNK2019: unresolved external symbol "public: class std::vector >::iterator __thiscall SvIoMessageItemArray::end(void)" (?end@SvIoMessageItemArray@@QAE?AViterator@?$vector@PAVSvIoItem@@V?$allocator@PAVSvIoItem@@@std@@@std@@XZ) referenced in function "public: virtual enum tagMSGSUCCESS __thiscall HelloPollMessage::Send(class SvIoTopic *,class SvIoHierarchy *)" (?Send@HelloPollMessage@@UAE? AW4tagMSGSUCCESS@@PAVSvIoTopic@@PAVSvIoHierarchy@@ @Z) ServerBase.lib(IosItem.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) private: void __thiscall std::basic_string,class std::allocator >::_Tidy(bool)" (__imp_?_Tidy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEX_N@Z)
-
how to create shortcut of a file from MFCHi, I would like to know how I can create a shortcut of a file and put that on the desktop from my MFC sdi application?
-
how to modify system path?how to modify system path? Hi, How can I modify the system verables (and user variable) PATH from my MFC application?
-
Urgent Help Neededwhy do I need to create a menu? I guess I didn't make my problem clear enough. any xml file in my computer-> right-click on it->Open With->Choose Program ->Other -> brows to and select my program -> OK. so no menu creation is needed. Now I just want to know if I do that how the XML file name is passed to my application and where do I capture that name to work on it.
-
Urgent Help NeededHi, From my SDI application I can open XML documents in my application using the Menus File | Open. I want to open the XML documents in my application by right-clicking on the XML document and then selecting Open With and selecting my application. Can anyone please tell me how I can do that? It’s urgent Thanks in advance
-
How to close a file opened by the user in MFC?Hi, I want to check from my SDI application if a particular file is opened by the user, and if opened I want to close that file. How do I do that? Please advise
-
how to create and delete directory from MFC?Hi, I have following questions: 1. How do I create a directory in MFC? 2. When my application exists I want to delete the directory. How to do that? 3. In the directory I want to keep a feh html files. Users can look at the htmls when the application is running. When the applications exists I want to do the following a) check any of those html files are open...How? b) close them ...how? c) delete them...how? e) delete the parent directory. Please advise.
-
Tree View gets grayed on Minimize-maximizeThanks a lot!...Redrawwindow() worked.
-
Tree View gets grayed on Minimize-maximizeHi, In my sdi application I have 2 tree views selectable by tabs. If I minimize and maximize the application the tree view looks grayed, only the selected node being visible. Can anyone tell me why and how to fix this?
-
RightClick | Open with | select application to open ...how?Hi, how do I achieve the following: I want to right click on a file and go to Open with and select my SDI application and it would be opened in my application the way it gets opened by File | Open etc. Please advise
-
How to call a dll from MFC SDI application?Hi, I don't have any experience with dlls. I have created a resource only dll and I want to call the resources from a different project, a SDI application. How do I so that? Please reply