C++ STL based socket library
I need a C++ STL (iostream, string, etc.) based tcp socket client / server. Does anybody know such library? ...
I need a C++ STL (iostream, string, etc.) based tcp socket client / server. Does anybody know such library? ...
Let's say I have a texture which is one file with separate 20 px by 20 px blocks. Within each of these blocks is a new character and I'd like to render different characters on screen as textures using these blocks. How can I use directx to render separate pieces of a texture file? ...
I have a really vague problem, but I hope someone can help with it. I was modifying a C++ project and yesterday it was still working, but today it's not. I'm pretty sure I didn't change anything, but to be completely sure I checked the project out from SVN again and I even reverted to a previous system restore point (because this is a wo...
I have insert working, and i have preorder,inorder,and post order working. I am working on retrieveItem where i try to find using a key. Thats when i realize that in my driver file(main()) that my class instance holds no information.( data aData) So, that makes it impossible to do the retrieve. Down in main() i have data aData; Th...
I keep getting this error - error C2819: type 'List' does not have an overloaded member 'operator ->' i can't figure out why? help? Main.cpp - #include <iostream> #include <string> #include <cassert> using namespace std; #include "List.h" #include "Node.h" The error happens here: void PrintList ( List list ) { Node * tem...
#include <Fl/Enumerations.H> class Color { public: static Color amber () {return fl_rgb_color (255, 204, 0);} static Color lighter_gray () {return fl_rgb_color (40, 40, 40); } static Color light_gray () {return fl_rgb_color (179, 179, 179);} static Color gray () {return fl_rgb_color (100, 100, 100);} ...
hi guys, i have tried this char c[4]; int i=89; memcpy(&c[0],&i,4); cout<<(int)c[0]<<endl; cout<<(int)c[1]<<endl; cout<<(int)c[2]<<endl; cout<<(int)c[3]<<endl; the output is like: 89 0 0 0 which pretty trains my stomache cuz i thought the number would be saved in memory like 0x00000059 so how come c[0] is 89 ? i thought it is suppo...
Hello :) Is there a way to double-buffer the common controls? Currently when they resize they flicker. A lot..... EDIT: If it helps, it is a bunch of button controls and a few edit controls, all sitting on top of a tab control. The Tab control redraws itself, then the buttons redraw themselves. When the buttons redraw, they flicker. E...
I am looking for quick reference guide(s) for both OO and C++. I have a few technical interviews coming up and I just want a quick reference that gives the basic overview of the fundamentals. (Nothing too in depth, as I've learned it all once before) ...
Hi all :) I was reading some code from the Doom 3 SDK ( in a VS solution ) when I found a header like this: #ifndef __PLAYERICON_H__ #define __PLAYERICON_H__ class idPlayerIcon { public: idPlayerIcon(); ~idPlayerIcon(); ...... // omitted public: playerIconType_t iconTyp...
std::wstring.c_str() returns a wchar_t*. How do I get from wchar_t* to TCHAR*, or from std::wstring to TCHAR* Thanks ...
This is a simple question - or maybe not - how do I add external headers to my project (C++ command line tool) in Xcode? How do I also add external dynamic libraries to it? any help greatly appreciated. I am new to xcode. Max. ...
I have a simple database and want to update an int value. I initially do a query and get back a ResultSet (sql::ResultSet). For each of the entries in the result set I want to modify a value that is in one particular column of a table, then write it back out to the database/update that entry in that row. It is not clear to me based o...
I'm just wondering if anybody knows an open source project devoted to convert ppt (or pptx) file to an easy-to-render format - html, jpg or other picture type, pdf... I've developed some code to start reading an office file (I'm talking about the Compound Binary File) and now I've started to crack on the internal ppt streams like Pictur...
A similar question was previously asked, but none of the answers really provided what I was looking for. I am having trouble deciding where consts should be located in a function. I know a lot of people put them at the top, but if you put them as close as possible to where they are used, you'll reduce code span. I.e. void f() { const...
Hi, We have need in our product to do partial evaluation to simplify expressions that contain both variables and constants. Goal is to combine terms algebraically to reduce the constants whenever possible. For example the following expressions: 4x + 6y + 2x 7 + 2x - 3 10^-5 * x * 10^-4 Should become (respectively): 6(x + y) 4 + 2x...
Hi, Newbie here. I am looking at company code. It appears that there are NO member variables in class A yet in A's constructor it initializes an object B even though class A does not contain any member variable of type B (or any member variable at all!). I guess I don't understand it enough to even ask a question...so what's goin...
hello, So i have a setup where two imacs, imac_1 and imac_2, are connected through firewire. imac_1 sends some debugging information to imac_2 and on imac_2 i have a program in c++ that captures debugging information.(see illustration below) Now the problem is that if i write the debugging info to the GUI (created using QT) directly i...
I have python code that contains the following code. d = {} d[(0,0)] = 0 d[(1,2)] = 1 d[(2,1)] = 2 d[(2,3)] = 3 d[(3,2)] = 4 for (i,j) in d: print d[(i,j)], d[(j,i)] Unfortunately looping over all the keys in python isn't really fast enough for my purpose, and I would like to translate this code to C++. What is the best C++ dat...
I know that the individual map queries take a maximum of log(N) time. However I was wondering, I have seen a lot of examples that use strings as map keys. What is the performance cost of associating a std::string as a key to a map instead of an int for example ? std::map<std::string, aClass*> someMap; vs std::map<int, aClass*> someMap; ...