General C++ Programming - July 2012 (Page 18)

by Craig
dynamic_cast with template class
 
Hello, Below is a simplified definition of my interfaces/classes. I cannot modify the definition of A_Base. I am trying to use a dynamic_cast to change t...
[2 replies] Last: This code worked when I last used it with Visual Studio.Net ... Any... (by Disch)
help, initializer not usable
 
why doesnt this work? #include <iostream> class player { int hp, atk; public: int hp = 10; //Error }; int main() { }
[6 replies] Last: Even with gcc 4.7 (or clang 3.0), line 5 needs to go. (by Athar)
drawing pixels in a bitmap
 
Hi everyone! Im a little new to c++ and this forum, so please correct me if this is not in the right topic area. My question is how can I create a Bitmap image ...
[2 replies] Last: I recommend SDL or OpenGL for drawing pixels, good luck! :) (by SH4773R)
find out problem
 
ddsfsdfsdfsd
[7 replies] Last: [quote=Oxford English Dictionary ]ddsfsdfsdfsd Noun A shortened ve... (by Script Coder)
connect C++ with mysql
 
J try to connect my database with c++, but when J compile in тhe output write me that no database selected.. My code is: #include <windows.h> #include <sq...
[2 replies] Last: Try to use 'SOCI' library, I made an update for last version of MySQL... (by Ivan Sidarau)
error:no member function declared in class
 
hi all, im using ns3 for my thesis. so i added i metod In a class called LteHelper.h in this way Ptr <LteNetDevice> InstallSingleUe(Ptr <Node> p); after t...
[1 reply] : There is a difference between "add metod In a class called LteHelper... (by vlad from moscow)
Null pointer abstraction
 
int *my_ptr = 0; When you set up a null pointer, printing the address will usually show it's pointing to memory address 0 (or 0x0 or 00000000 or what h...
[3 replies] Last: Excellent. Cheers guys. (by MrHutch)
time independent random
 
Is it possible to generate a different random number using two identical codes at the same time? And if it is possible any ideas would be very appreciating. ...
[6 replies] Last: Thank you very much! On the Linux this is working fine. #include ... (by fotoni2)
overloading std::string operators requires template<> syntax ! Howto ?
 
Hi all, I need to overload a cast to u_int32_t of std::string. I wrote this : string::operator u_int32_t() const {return 0;} But the compiler says : ...
[2 replies] Last: Thanks Peter87 (by lalebarde)
by CMarco
struct one inside another
 
Hi, I'm trying to define two strut's one inside another and I'm doing like above but it no recognize tabela_e on struct nrotas, can someone advise me. ...
[8 replies] Last: My suggestion is to do what I said above. typedef struct is a C klu... (by Moschops)
Difference between <iostream> and <iostream.h>
 
Hi everyone, I just wanted to ask what the difference between these two is: #include <iostream> and #include <iostream.h> I am just a bit confused.
[4 replies] Last: Yeah, thanks! (by Shahmeer)
Classes
 
Hi all, I receive an error when compiling this. Cant understand why. error: request for member 'toString' in 'shape; which is of non-class type of 'GeometricO...
[5 replies] Last: When building a program you first have to compile all the source (.cpp... (by Peter87)
Executing two commands at a time
 
Hello everyone, Basically I am a Android Developer and have a basic knowledge on C++ I am making a program to execute logcat on Android phone but I am stuck a...
[5 replies] Last: I personally use the Code::Blocks/GCC Compiler, and it supports many o... (by Volatile Pulse)
by yereke
classes in headers
 
Hi, I am trying to include a small test class in a header file and call it from a main program, but when compiling it gives some errors. could you help me ou...
[2 replies] Last: thanks, well spotted. (by yereke)
How to sort singly linked lists with merged sort?
 
Are there any header files, that just go like: merge_sort(list beginning, list end) or do I have to create my own code or are there any codes that I can impleme...
[2 replies] Last: I do want the code. Thank you! :) You mean this code, right? http://ww... (by Vanapapi)
How to discard mouse click in TDBGrid->OnColumnMoved
 
Hi All, In a TDBGrid->OnColumnMoved event handler, I adjust some column sorting data mode. First mode : If user click the title header, the sorting mode is ...
[no replies]
sourceannotations.h
 
Please help me. I've been working on OpenGL, doing tutorials at my friend's house. When I got home, I had to install the glaux lib onto my computer. I did so, a...
[15 replies] Last: Is this legal code though? typedef _W64 unsigned int size_t; Readin... (by Volatile Pulse)
Drunken Jailer problem III
 
I figure out that the number of square number will be unlocked cells. but online judge did not accept my result. i have been reading the problem over a...
[5 replies] Last: Solving analytically: #include <iostream> inline int integral_sqrt(... (by JLBorges)
OpenCV 2.4 with Dev C++
 
Hi everyone, my head's hurt finding a proper method of installing OpenCV and integrating it with Dev C++. The proper tutorials are obsolete (2.1 and below) w...
[2 replies] Last: Only help I can offer is my guide to install it for Visual C++ 2010. M... (by mjepson)
How to write vertically in C++.?
 
Write the program to display the output as below using only ‘cout’ statements. Use suitable formula to calculate the values: N N*10 N*100 N*1000 1 ...
[6 replies] Last: Welcome.. But it's not acn(1)... just acn is enough ..... (1) is no... (by acn)
July 2012 Pages: 1... 1617181920... 30
  Archived months: [jun2012] [aug2012]

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