How can i avoid name mangling ?
...in c++ ...
...in c++ ...
For educational purposes i want to create a ostream and stream buffer to do A) fix endians when doing << myVar; B) store in a deque container instead of using std:cout or writing to a file C) log extra data, such as how many times i did <<, how many times i did .write, the amount of bytes i written and how many times i flush(). But i do ...
The accepted answer to the question C++ Library for image recognition: images containing words to string recommended that you: Upsize/Downsize your input image to 300 DPI. How would I do this... I was under the impression that DPI was for monitors, not image formats. ...
I had been wondering for quite some time on how to manager memory in my next project. Which is writing a DSL in C/C++. It can be done in any of the three ways. Reference counted C or C++. Garbage collected C. In C++, copying class and structures from stack to stack and managing strings separately with some kind of GC. The community ...
I have c++ code that attempts to dynamically allocate a 2d array of bytes that measures approx 151MB in size. When I attempt to go back and index through the array, my program crashes in exactly the same place every time with an "Access violation reading location 0x0110f000" error, but the indicies appear to be in range. That leads me ...
I'm taking programming class and instructor loves to work with images so most of our assignments involve manipulating raw RGB image data. One of our assignments is to implement a standard image converter that converts SD images to HD images and vice versa. I always take advantage of these types of assignments to go a little beyond what...
I am making an application that does some custom image processing. The program will be driven by a simple menu in the console. The user will input the filename of an image, and that image will be displayed using openGL in a window. When the user selects some processing to be done to the image, the processing is done, and the openGL windo...
Original Question What I'd like is not a standard C pre-processor, but a variation on it which would accept from somewhere - probably the command line via -DNAME1 and -UNAME2 options - a specification of which macros are defined, and would then eliminate dead code. It may be easier to understand what I'm after with some examples: #ifd...
Does the stack in the C++ STL expose any iterators of the underlying container or should I use that container directly? ...
Hi. I would like to write applications that use C++ and the Cocoa frameworks because Apple are not making Carbon 64-bit capable. C++ seems to be pretty vanilla in it's implementation on Linux and Windows but on Mac OS X it seems like additional Apple specific pieces of code are required (like an Obj-C wrapper). It also seems that Apple a...
Hi guys! I'm practicing for a competition (that's where my previous question came from). I got the algorithm sorted out for the question, but I'm having some problems with the actual programming. It's a solo competition, so I really need to get this sorted out before I go for it. This is the question. TASK 3: GECKO During the rainy s...
I've started a new project and have decided to make sure it builds cleanly with the /Wall option enabled. The only problem is not all 3rd party libraries (like boost) compile without warnings, so I've resorted to doing this in a shared header: #pragma warning(push) #pragma warning(disable:4820) #pragma warning(disable:4619) #pragma war...
So I have been a .Net developer for the past decade and am thinking of learning either C or C++ (with a strong preference to C++). Does anyone know a good place where a C# fanboi can get started learning C++ (or C)? With so many tutorial sites on the web, it hard to know where to start, and if there is one which might be more accomodat...
So I am a long time .Net developer looking to branch into something new to further my professional development. I have reduced the next language to learn as one of c++, Python or Ruby and want to hear everyone's thoughts on what I should pick, and why? What trials and tribulations have others found when moving from c# onto one of these...
This is a C++ disaster, check out this code sample: #include <iostream> void func(const int* shouldnotChange) { int* canChange = (int*) shouldnotChange; *canChange += 2; return; } int main() { int i = 5; func(&i); std::cout << i; return 0; } The output was 7! So, how can we make sure of the behavior of ...
Hi, This should be a fairly trivial problem. I'm trying to open an ofstream using a std::string (or std::wstring) and having problems getting this to work without a messy conversion. std::string path = ".../file.txt"; ofstream output; output.open(path); Ideally I don't want to have to convert this by hand or involve c-style char po...
In Windows when you create a window, you must define a (c++) LRESULT CALLBACK message_proc(HWND Handle, UINT Message, WPARAM WParam, LPARAM LParam); to handle all the messages sent from the OS to the window, like keypresses and such. Im looking to do some reading on how the same system works in Linux. Maybe it is because I fall a bit...
I am doing a report on the various C++ dictionary implementations (map, dictionary, vectors etc). The results for insertions using a std::map illustrate that that the performance is O(log n). There are also consistent spikes in the performance. I am not 100% sure what's causing this; I think they are caused by memory allocation but I ...
Today, I noticed that when I cast a double that is greater than the maximum possible integer to an integer, I get -2147483648. Similarly, when I cast a double that is less than the minimum possible integer, I also get -2147483648. Is this behavior defined for all platforms? What is the best way to detect this under/overflow? Is put...
Hi! I have a problem with the OpenGL canvas of the wx library. When I use the method SwapBuffers of wxGLCanvas the whole process will be terminated with exit code 1. If I remove the method call the program runs on and on. Unfortunately there is no GL drawing as well. I think it is an internal problem of the wx library. Maybe due to som...