visual-studio-6

Can I return Null iterator from a function

£可爱£侵袭症+ 提交于 2020-02-14 02:28:30
问题 I'm porting some old code from vs6.0 to vs2015. A function is returning a Null iterator; the caller compares it with NULL , which works in vs6.0, but in vs2015 that's an error. Is it possible that we can return a null iterator? The old code looks something like this: vector<string*>::iterator FindByCode() { //some code if (itr == str.end) { return NULL; } else { return itr; } } int main() { vector<string*>::iterator itr = FindByCode(); if (itr == NULL) { return EXIT_FAILURE; } } 来源: https:/

Title of Message box not setting up

喜夏-厌秋 提交于 2020-01-16 21:59:28
问题 I am writing some code in Visual Basic 6. It also uses the Msgbox funtion. Now I searched this and I got to know that if you want to set the title of the Message box then this is the syntax: Msgbox(<Prompt>,<Title>) For example, I write this: MsgBox ("Incorrect Answer!","QM") It says: Compile Error Expected: = Can someone tell me what is the problem? 回答1: With VB6, you can either request a response, and do something based on the answer, or you can simply display a message. If you want to know

fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line 1794)

放肆的年华 提交于 2019-12-22 10:29:54
问题 I tried to compile a project with Visual Studio 6 SP6 and got the following: usbcore.h(18) : fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line 1794) Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information Line 18 of usbcore.h contains the include directive: 18: #include "usbiface.h" Empty or non-existing usbiface.h produces the same error. I commented this line and got the same error but for

how to avoid “already defined error” in C++

空扰寡人 提交于 2019-12-12 09:38:47
问题 I am gettings these type of errors in a MFC VS6 project while linking the application: msvcrt.lib(MSVCRT.dll) : error LNK2005: _atoi already defined in LIBC.lib(atox.obj) I know what it means (a function exists in 2 different libraries); to solve it I should have to exclude one of the 2 libraries ( msvcrt.lib or libc.lib ). But if I do this there are all kinds of unresolved external errors. So I would like to keep using both libraries. Is there any way to tell the linker that I want to use

dll works fine in a VS2010 project but gives access violations in a VS6 Application

蹲街弑〆低调 提交于 2019-12-11 12:09:59
问题 I have been creating a dll for a usb device over the past few weeks, the device came with its own dll which i used to create my own dll in VS2010, I then created a test application which uses said dll in 2010 to get it working. It works well, however I now need to use it in a VS6 project, when i use it I get access violations, I recreated the dll in VS6 to see if that would help, it allowed me to step into the code, as soon as it gets to a line in my dll that calls the 3rd party dll, it

How can I catalog, index, and/or print VB6 source code, with each sub/function on a page..?

橙三吉。 提交于 2019-12-10 13:40:08
问题 How can I catalog, index, and/or print VB6 source code with each sub or function on its own page..? I would like to do so with free or included Visual Studio Add-Ins if possible, but I'm not adverse to writing something myself. I'm familiar with "Microsoft Office Visual Basic for Applications Extensibility", and it seems that VB6 has a similar module, which may allow me to simply "For Each" through the code module collection and throw the subs at the printer one at a time. It would take maybe

how to avoid “already defined error” in C++

放肆的年华 提交于 2019-12-10 04:54:54
问题 I am gettings these type of errors in a MFC VS6 project while linking the application: msvcrt.lib(MSVCRT.dll) : error LNK2005: _atoi already defined in LIBC.lib(atox.obj) I know what it means (a function exists in 2 different libraries); to solve it I should have to exclude one of the 2 libraries ( msvcrt.lib or libc.lib ). But if I do this there are all kinds of unresolved external errors. So I would like to keep using both libraries. Is there any way to tell the linker that I want to use

Strange behavior when casting an int to float in C

霸气de小男生 提交于 2019-12-10 00:40:53
问题 I have a doubt concerning the output of the following C program. I tried to compile it using both Visual C++ 6.0 and MinGW32 (gcc 3.4.2). #include <stdio.h> int main() { int x = 2147483647; printf("%f\n", (float)2147483647); printf("%f\n", (float)x); return 0; } The output is: 2147483648.000000 2147483647.000000 My question is: why are both lines different? When you convert the integer value 2147483647 to the IEEE 754 floating-point format, it gets approximated to 2147483648.0. So, I expected

fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line 1794)

天涯浪子 提交于 2019-12-06 03:37:53
I tried to compile a project with Visual Studio 6 SP6 and got the following: usbcore.h(18) : fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line 1794) Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information Line 18 of usbcore.h contains the include directive: 18: #include "usbiface.h" Empty or non-existing usbiface.h produces the same error. I commented this line and got the same error but for the next include file. To sum this up: the compiler error occurs for each #include directive that

how to avoid “already defined error” in C++

戏子无情 提交于 2019-12-05 07:25:45
I am gettings these type of errors in a MFC VS6 project while linking the application: msvcrt.lib(MSVCRT.dll) : error LNK2005: _atoi already defined in LIBC.lib(atox.obj) I know what it means (a function exists in 2 different libraries); to solve it I should have to exclude one of the 2 libraries ( msvcrt.lib or libc.lib ). But if I do this there are all kinds of unresolved external errors. So I would like to keep using both libraries. Is there any way to tell the linker that I want to use the _atoi function in libc.lib and not in msvcrt.lib (or the other way around)? Any help or direction