General C++ Programming - December 2011 (Page 25)

Operator and Casts
 
So here's my problem. In my class, I have got an addition operator '+' and a long long int cast It's something like friend BigNumber operator + (BigNumber& n1...
[2 replies] Last: And if the compiler found 2 possible 'paths' for the operation between... (by bartoli)
how to avoid this mem leak problem
 
How to avoid lb from getting leak with the situation below //A.h class A : public Gtk::Button{ A(); }; //A.cc A::A(){ Gtk::Label *lb = new Gtk::Label("...
[3 replies] Last: If your object only has a use in the body of one function and is not n... (by bartoli)
Creating a stand alone .exe
 
Hey this might be too simple a question and should be in beginners so apologies if so. If not here we go: I am using Visual Studio 2008 Express Edition. I'...
[7 replies] Last: Thanks very much everyone, I tried it this morning and it worked :D (by jamesbouckley)
A pointer to an object and a constructor
 
Well, by default a constructor gets called whenever an object is created. But is the same applicable when we create a pointer to an object? I do not see a ca...
[3 replies] Last: @firedraco - You said EXACTLY what I needed to understand. While creat... (by incognito)
How do i make a letter move on its own?
 
ive been trying to make a little pac-man type game but i cant seem to get the little ghost to move randomely on their own... Anyone have any advice? Ive tried ...
[1 reply] : Firstly, http://cplusplus.com/articles/G13hAqkS/ Now, your ghost obje... (by hamsterman)
set and get functions
 
Having a little trouble with the set and get functions, can anyone help me? #include <string> // program uses C++ standard string class using namespace st...
[9 replies] Last: Thanks for all the help guys,I'm very new to programming so I'm still ... (by fsufreak78)
Confused on Pointers to Classes
 
I'm having a bit of confusion on how to use different types of pointers to class members. Like "Class.Member" versus "Class->Member". What situations would you ...
[1 reply] : object.member pointer->member You could overload the operator-> for... (by ne555)
by ssg10
Please recommend books
 
Hi, I am from C background and trying to learn C++ on linux Could anyone recommend me books (free is better :) ) that: - teaches concepts of basic c++ OO...
[5 replies] Last: I highly recommend Accelerated C++ http://www.acceleratedcpp.com/ It ... (by Galik)
Add the objects of a vector
 
Hi, I have 3 classes:Company,Department and Employees.Company has collection of departments and each department has collection of employees. In the depart...
[2 replies] Last: Below is the code.Thanks in advance. Company.h #include "Department.h... (by sita kalidindi)
How to find a particular string is existing in a vector or not?
 
Hi, I wrote a code where i need to a find in order to search whether a particular string is existing or not? main.cpp set<Person>p; p.insert(Person...
[7 replies] Last: Try using reference to const bool operator==(const Person& p) const; ... (by Peter87)
const
 
I just want to know that why do we use const and the begining of the function like const char* func(); or const at the end of the function . char* fun...
[4 replies] Last: Thanks CodeMonkey , webJose , Peter87 .. thanks all of you .. this cle... (by bluecoder)
Destruction of referenced object
 
A reference to a newly instantiated (in function 'A') object is passed in a call to another function, 'B', that places it into an STL map. The called function a...
[4 replies] Last: Thanks, Peter! (by hawkandspit)
Header file error
 
Deleted for privacy reasons.
[3 replies] Last: No need to feel stupid, making mistakes is part of learning. (by closed account 1vRz3TCk)
by Kuzco
To get/set or not to get/set...
 
Hi there! So I'm reading about drawing 2D graphics with DirectX, and I've come to making a sprite pool. The author in the book use stuctures, but I thought i...
[7 replies] Last: First, you can add constructors to structures. They are identical to c... (by Galik)
by Srija
Microsoft Visual Studio 2008 Express edition
 
hi all From a long time I am searching for the MS visual studio 2008 express edition . I have gone through the search but they mentioned only set...
[5 replies] Last: Check out this tutorial: http://teamtutorials.com/software-tutorials/h... (by Warnis)
hi guys ! :)
 
hi guys . my professor gave me a special project MOVIE RESERVATION SYSTEM " The project should have a main menu where users can select from a list of option...
[3 replies] Last: Why would we make your homework? Idle effort for us and you won't lear... (by Gaminic)
Convert it to Function plz...
 
So, there is my coding, but i use, if else, BUT the one suppose is Function... #include<iostream.h> #include<string.h> int main() { char lect_name ,subject ;...
[2 replies] Last: i had submit, yes, not above there, i did my function coding... i ha... (by khaelly)
by kcbob
Problem with Fibonacci assignment
 
im having difficulty understanding this assignment Write a program that will trace how Fibonacci numbers are generated recursively (for any N) and display t...
[1 reply] : The problem should've been more informative. Anyways this is all what ... (by Pravesh Koirala)
by Mr T
Redesigning a string & integer textfile
 
Hello to everyone, I am new here and new to programming with c++. My knowledge is surely at beginner level. I have a textfile which contains strings and inte...
[6 replies] Last: thanx Duoas, I'll check it out in the weekend as soon as I get some fr... (by Mr T)
by ketu83
openssl compilation failure
 
I am using a c program, in which openssl is included, as #include <openssl/rsa.h> I am using Borland C++ 5.5 to compile and run this program. When in comma...
[no replies]
December 2011 Pages: 1... 2324252627... 39
  Archived months: [nov2011] [jan2012]

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