visual-c++

TCHAR problem in copy

Help. TCHAR* b; TCHAR* c=TEXT("qwerty"); I want to allocate memory and copy content of c into b. ...

Defragmenting the registry

Hi All, Does any body know how to defragment windows registry. We googled and found several free tools doing the same.But no tool is having open source. One tool is there - 'UltraDefrag' which is open source tool written in 'C' for file defragmentation. Please provide help in searching open source/ sample code to defragment windows re...

Best practices for handling string in VC++?

As I am new to Visual C++, there are so many types for handling string. When I use some type and go ahead with coding but on next step, there are in-build functions that use other types & it always require to convert one type of string to other. I found so many blogs but so confused when see so many answers & try but some are working & s...

Visual C++.NET , speed optimizations

Hello, I want my VC++ code to be executed as fast as possible. Does anybody know what I should change or set in project properties and settings? ...

new with exception with Microsoft

As I'm coding for both Windows and Linux, I have a whole host of problems. Microsoft Visual C++ has no stdint header, but for that I wrote my own. Now I found out that MS C++'s new operator does not throw an exception, so I want to fix this a quickly as possible. I know I can define a Macro with Parameters in Parenthesis, can I define a...

how to learn winsock or raw sockets? (c++)

i have been googleing trying to find a Winsock book or something about networking but all i can find is out of date books or nothing at all :( so does anyone know a book i can buy to learn about networking in VC++ 2008? i really would like a book i could hold because i learn better when it's in my hand. ...

how to get the colors on the screen better then get pixel? (c++)

i made a program that uses the colors of pixels from the screen but getpixel is slow so is there a better way to find the color of pixels. i don't care if i get the full screen or one pixel at a time but the main thing is speed. ...

Dilemma of Sending a Byte Array from JavaScript to COM.

Hello there, I'm having a bit of a problem because neither Javascript nor ActiveX (written in C++) are behaving like good little children. All I'm asking them to do is for Javascript to send a byte array and for the ActiveX to receive the byte array correctly in order to do more computation. This is how I declared my byte array in JS, a...

Visual C++ 6.0 Academic Edition, using MFC as a static library

I need to compile some mfc code that was written using Visual C++ 6.0 many years ago. I was supposed to be able to choose New->Project->Win32 Application and then in Project->Settings choose "Using MFC as a static library." I'm using the AE version and this could be the reason that this option is not available. So far, the smaller progra...

Has the small object allocator found in "Modern C++ Design"/Loki been deprecated in favor of newer implementations?

It seems the code and the book have been relegated to the foundation of the movement of modern C++, and isn't updated any more. Is there some kind of replacement for this in Boost or TR1? ...

inline and member initializers

When should I inline a member function and when should I use member initializers? My code is below.. I would like to modify it so I could make use some inline when appropriate and member initializers: #include "Books.h" Book::Book(){ nm = (char*)""; thck = 0; wght = 0; } Book::Book(const char *name, int thickness, int weight){ ...

read access violation error

class Node{ private: string name; Node** adjacent; int adjNum; public: Node(); Node(string, int adj_num); Node(const Node &); bool addAdjacent(const Node &); Node** getAdjacents(); string getName(); ...

How can i get rid of 0xFEEFEE in VC

Hi guys I m programming C for an assingment in VC++ 2008. I simulate adjList for graph implementation. i can readly add edge between two vertex and print the graph. and i want to remove edge between two vertex and print the graph again. whatever i do,i cant print the graph after deleting the edge. i get 0xfeefee :( what is this? and...

VC++ 6 and MS Speech SDK 5.1 fatal error C1083: Cannot open source file: 'files\microsoft': No such file or directory - doesn't seem to be spaces prob

Trying to compile an application (flite synthesis sapi) on vc++6. This requires Microsoft Speech SDK 5.1 Have included C:\Program Files\Microsoft Speech SDK 5.1\IDL C:\Program Files\Microsoft Speech SDK 5.1\include using Tools>options>directories and also on another attempt via Project>Settings Repeatedly get this error mic...

alternative to strdup

I am using strdup here to copy the value of the parameter name into nm in the constructor... is there an alternative of achieving the same result without using strdup and without using the C++ STL library and using the keyword new instead? Book::Book(const char *name, int thickness, int weight):nm(NULL), thck(thickness), wght(weight){ ...

Question about CppUnit

Does CppUnit have the ability to generate an html or xml file of its test cases and test results? ...

Can I switch the Visual C++ runtime to another heap?

My program uses a third party dynamic link library that has huge memory leaks inside. Both my program and the library are Visual C++ native code. Both link to the Visual C++ runtime dynamically. I'd like to force the library into another heap so that all allocations that are done through the Visual C++ runtime while the library code is ...

Function return type style

I'm learning c++0x, at least the parts supported by the Visual C++ Express 2010 Beta. This is a question about style rather than how it works. Perhaps it's too early for style and good practice to have evolved yet for a standard that isn't even released yet... In c++0x you can define the return type of a method using -> type at the end ...

How can i use a C# dll in a Win32 C++ project ?

I am working on a solution, most of its core engine is developed as Win32 C++ (and is Platform independent and is also used on OS X), some time ago we needed to call C++ dll's of core engine from C# and I was able to Load main solution's DLL in C# (by the help of some threads here on SO). but now we have certain things implemented in Man...

Source files not located in Microsoft Visual Studio

Where does Microsoft Visual Studio look for source files? I have this line of code in my program: IDB_EJECT_BTN BITMAP "res/eject_butt.bmp" that throws up an error saying line not found. I have included the res file containing the set of images in the output directory of the code program as well as the same di...