visual-c++

read three files

create a c++ program that will read the three files and output the contents of the screen. ...

What does C4250 VC++ warning mean?

What does C4250 Visual C+ warning mean in practical terms? I've read the linked MSDN page, but I still don't get what the problem is. What does the compiler warn me about and what problems could arise if I ignore the warning? ...

Difference between intellisense and compiler in VS.NET C++ 2010

Is the following legal C++ code: class C { static public int x; }; It compiles OK in Visual Studio 2008 C++ and Visual Studio 2010 C++ (beta 2). But the static member x does not end up being public. In Visual Studio 2010 beta 2 the experience is even stranger. Intellisense reports an error "expected an identifier", but the co...

Problem displaying Icon in a button in windows xp(SP2) (MFC)!!

Hello friends,I had a problem in displaying icon in button along with the Text in MFC application.. after reading lot of arctilces I got a solution for that and it worked great.But when I tested my application in win xp(SP2)..it suprised me by not showing the icon..Check the below code which i used to display the icon along with a test i...

Which one is faster, reading from disk or allocate system memory

Hi guys, My environment is XP 32-bit. I find when allocated memory is nearly the maximum size, 2GB, that means a little virtual space is available, allocationnew memory is very slow. So if I have a page file, my app need to analyze them. I have two ways. One is to read them all into system memory, then do the analysis. The other is to...

How do I predict serious memory fragmentation issue is likely to happen?

Can I check the page fault time or something else.. :) ...

VC++ WebBrowser Control .Net Dependancies

Does webbrowser control depend on the .NET Framework when used in VC++? ...

Is it necessary to explicitly stop all threads prior to exiting a Win32 application?

I have a Win32 native VC++ application that upon entering WinMain() starts a separate thread, then does some useful job while that other thread is running, then simply exits WinMain() - the other thread is not explicitly stopped. This blog post says that a .NET application will not terminate in this case since the other thread is still ...

Is the following valid C++ code?

If it is, what is it supposed to do? typedef struct Foo_struct{ Dog d; Cat* c; struct Foo_struct(Dog dog, Cat* cat){ this->d = dog; this->c = cat;} } Foo; (back story: porting a program written in Visual C++ (on Windows) to g++ (on MacOSX); no idea what this code is suppoesd to do). Thanks! ...

Which kind of cast is from Type* to void*?

In C++ for any data type I can do the following: Type* typedPointer = obtain(); void* voidPointer = typedPointer; which cast is performed when I assign Type* to void*? Is this the same as Type* typedPointer = obtain(); void* voidPointer = reinterpret_cast<void*>( typedPointer ); or is it some other cast? ...

How to run a single .c file in a .lib project in visual C++ Express?

I tried right click that .c file,but there is only a "Compile" option. How to run the main function inside it? ...

Can't include a static lib(.lib) in visual c++

I've added a .lib to my c project, but still can't use things defined in that .lib in .c main() { structure_defined_inthat_lib c; ... I added that .lib this way: Right click ,property,Linker,Input, and in "Additional Dependencies",I type in "D:\path\name.lib" Anything wrong? ...

Get all URLs accessed, with response times?

Can anyone help me how to get (or log) all URLs accessed by web browsers in a computer. Together with its response time? Note: visual C++ will be the Programming language to be use and this will run under windows platform. ...

How can I retrieve current terminate() handler without changing it?

Here's the problem. My application calls CoCreateInstance() to create a COM object implemented in a third-party DLL. That DLL calls set_terminate() to change the terminate() handler and passes an address of its own terminate() handler there. The initial terminate() handler address is not saved by that library - it doesn't care and simpl...

how do i turn my program into something i can install?

how do i turn my VC++ 2008 program into something i can get to run on other computers. i have tryed using the .exe it makes in the debug but it will say that im missing some files and lists all of my .cpp file names and .h files(if i use it on other computers). i wanted something so i could encrypt my files because one of them is about e...

How to attach VC++ debugger (or gdb) in this situation?

I'm running a typical producer and consumer process, but they are executed by using pipe in the command line like the following: c:\>producer | consumer producer is just printing out data to stdout, and consumer reads from stdin. My problem is that I want to debug consumer process. What is the best way to do it in both VC++ and gdb? ...

Beginner problem with inline assembly

I am using VS2008 C++ (no libs). This is my code: __asm { jmp start msg: db "http://www.stackoverflow.com" dtfld: db "00/00/0000" tmfld: db "00:00:00" start: I am getting the following errors: Error 1 error C2400: inline assembler syntax error in 'opcode'; found 'bad token' Error 2 e...

Manual alternative to message map?

I am trying to create a GUI to display information read from a file. So I will need some number of pushbuttons, text fields, and radio buttons - but I won't know how many I need until run-time. I am using Visual Studio 6.0. My toolset is fairly non-negotiable, so please refrain from suggesting Java, or any C++ toolkit that does not co...

Can I create a simple DB browser with VS 2010 like I could with VS 6?

Having recently installed the beta of VS 2010, I'm curious whether anybody knows how to get it to do something that was quite straightforward with VS 6. To create a simple database browser in VS 6, you could create an MFC application using a database view, connected to (for example an ODBC connection. Then, the interesting part. In a nor...

Why is Sleep(1000) resulting in a deadlock?

I have a basic Win32 console app that makes a call to a named pipe, and then Sleep(1000), inside a while(true) loop. After a hundred iterations, Sleep(1000) will hang. I can see no reason for this. Ok, all I'm doing is taking the code found in this MSDN sample, verbatim and running it as the server: http://msdn.microsoft.com/en-us/libra...