General C++ Programming - June 2010 (Page 5)

[C++] Friend of Class Inaccessible
 
Hi, I have a class that has a function that dynamically allocates a friend class and tries to access one of its private methods. I'll simplify the code to sh...
[2 replies] Last: Much appreciate the quick response, works like a charm. (by yoonkwun)
hook dll
 
Hello, ive been trying to create a winsock send/recv hook dll which i could inject into programs but despite my best efforts it just crashes the target program....
[no replies]
by ibwood
Program character interpretation USB ports
 
Hi all, I am working on a program that takes a character input from the user and sends information through USB ports to motor controllers of a robot. The pur...
[6 replies] Last: Awesome thanks! That fixed the problems :) now i just need to somehow ... (by ibwood)
Singleton Class
 
I have some question about singleton class. 1) what is singleton class 2) how can a write a signleton class code 3) can we write any class which return...
[8 replies] Last: It's not so simple to create a template for a Singleton class. If it ... (by jsmith)
by skater
Need an ideea for Chess
 
Hi everyone, i am looking for a way to generate the moves for each depth without them interfering with eachother, More explicitly i'm looking for a way to do Ge...
[9 replies] Last: UPDATE: i've implemented a depth-first like algorithm .. that ta... (by skater)
multimap inside class accept stuct
 
Hello guys I am stuck in a small part . How do you declare a class class test{ private: multimap<int, stuct member<; }; its not working with me , can ...
[6 replies] Last: Good catch. I was thinking of actually comparing pair to pair, but th... (by moorecm)
vector push_back crashes application
 
In my C++ app. code created using VS 2008 I have used vector to store name of comp.The issue I m facing is if comp name is somewhat smaller (lets say "p1") it w...
[3 replies] Last: Well what does ConvertWstringToString do? How do you expect us to kno... (by kempofighter)
reference parameter in constructor
 
class engine{ public: engine(); engine(const engine& eng); engine(double mass); ~engine(); void run(); private: ... }; class rocket{ public: ...
[4 replies] Last: I got it! rocket::interval is a struct timespec* pointer. I now... (by timothyguo)
What is wrong with this?
 
when I enter The code below it says 2 errors and both are : too many characters in constant too many character in constant #include <iostream> using nam...
[4 replies] Last: int b is integer type, not a string. You can write #include<string>... (by timothyguo)
by gr3go
simple operator<< question
 
Hello everbody! I am wondering what is happening behind this code: int x = 4; cout << ++x << x++ <<endl; int y = 4; cout << y++ << ++y; The output...
[4 replies] Last: Thanks for the quick answers :) The undefined behavior seems to be a ... (by gr3go)
realloc is not your friend?
 
So the contents of a vector get ALL copied when a memory reallocation happens. I wonder, why exactly did my book say, that realloc isn't my friend and for what ...
[11 replies] Last: Ok, thanks for that. However, it would need to be written for completi... (by KarlisRepsons)
Code::Blocks and GDI+
 
Hello everyone. I was just wondering if anyone has or knows how to use gdi+ in C::B. I'm using C::B in WinXP with the GNU GCC Compiler and I've downloaded t...
[no replies]
by vivmen
operator overloading fails
 
hello all here operator overloading of -> operator fails , why ? any idea ? , thanks in advance class test { public: void operator->() { c...
[4 replies] Last: thanks R0mai. it really helps. (by vivmen)
Name Mangling in C++
 
Hi friends, I came across a thread which said name mangling is the thing which makes C++ code to be re-compiled everytime when a different compiler i...
[11 replies] Last: Yes, it's impossible. Giving the compiler the freedom to generate what... (by helios)
by qabil
about source code
 
hy.. I have make a program..but I lost the source code can I get the source code from the program ?
[4 replies] Last: I don't think you can get the source. You better get ready to write it... (by EliteHussar2)
Issue with Boost
 
Im getting a compiler error with boost: 1>------ Build started: Project: boost test, Configuration: Debug Win32 ------ 1>Compiling... 1>main.cpp 1>Plea...
[7 replies] Last: Properties > C/C++ > Command Line (by helios)
Inherit class form different header file
 
Hi, I have a problem with my project. I need to inherit a class vector from element class , heres what i have now , i tried alot of things but they didnt work...
[10 replies] Last: I am sorry if i am not clear in explaining the problem . basically fo... (by aymank1985)
Ctor, Dtor problem with handles
 
Hi all, I've created a class which uses the winapi. It has a number of constructors and a destructor. The class is called 'Thread'. When I use it like this: ...
[4 replies] Last: Ok thanks! (Many C programmers are used to the "declare on one line,... (by magnificence7)
hash_set vs hash_map
 
I have a class that looks like: class MyClass { private: std::string _name; // Some other stuff public: std::string getName(); // returns _nam...
[3 replies] Last: Use a map with the name as the key. (by PanGalactic)
const pointer in a throw list + inheritance
 
My experiments with exceptions and throw lists in particular lead me into this problem: I can't compile with GCC the following code, which works just fine, if t...
[11 replies] Last: (And one other thing... it is recommended to throw by value and catch ... (by jsmith)
June 2010 Pages: 1... 34567... 18
  Archived months: [may2010] [jul2010]

This is an archived page. To post a new message, go to the current page.