General C++ Programming - August 2013 (Page 5)

(*it)-> cleanup.
 
I ran into this today which seemed excessively verbose. Does anyone have a cleaner way of doing it? class pet { public: virtual void eat(); }; c...
[8 replies] Last: I often forget about the technical releases (which work quite well in ... (by LB)
by Ishtar
C++, Bitmap Image Arrays and byte padding
 
Hello everyone I am writing a class which loads a bitmap image into a one dimension char* array. This class has methods to allow for resampling and croppi...
[2 replies] Last: Hi Disch Thank you ever so much, I now have my class working :) I add... (by Ishtar)
Best OpenGL library for c++
 
What OpenGL library should I use for c++. I know there is GLU GLUT GLT OpenGlPlus. I want simple 2D games and GUI applications.
[no replies]
Making GUI order
 
Hello at all, I'm triying to create a GUI with Open graphics Libraries. I have made a basic GUI that exits the program or shows the instructions if a option/P...
[1 reply] : Anyone? (by Marc Colome)
string help
 
Hi there, I've been trying to create a model loader and I have somewhat succeeded but I need these 2 tools to succeed. The first one is say I have a file that l...
[2 replies] Last: I used scanf instead ! (by akash227)
File I/O Help
 
Hi there, I have been trying to load certain file formats but have not had luck due to my lack of knowledge in file i/o. The 2 file formats are .obj and .ply...
[6 replies] Last: Yes, it is too learn and I finally have found the functions used I jus... (by akash227)
Problem with reading multiple text files and merging them into one output file
 
Hi, I need help to program as stated by topic. Basically, I need to create a program that asks user to enter the number of input files, input filenames and o...
[9 replies] Last: [quote=helpstudent] const char *cstr ; //... for (int i = 0; i < ... (by LB)
Problems with Parallel Port
 
I have written this little code : #include<iostream> #include<cstdio> #include<sys/io.h> using namespace std; int main() { unsigned char a; cin >> a; ...
[no replies]
Vector get passed to a thread by val insted of by ref
 
I have a function : void UpdateNotefications(vector <string> &Notefic) where I change a vector... I called it with a thread : thread t1 (Upda...
[6 replies] Last: Thanks! (by AmitM9S6)
Array searching problem
 
I am having a problem printing out the results for my code, It is supposed to print out the largest and smallest value in the array, but keeps giving me a value...
[2 replies] Last: Oh wow, I didn't even realize that. Thanks (by MrBrewski99)
by Ceset
installing SDL_image problem
 
hi i m having problems for a few days. not sure what the porblem is and here is a pic to show you my installed sdl(in case problem is there) http://postimg.org...
[16 replies] Last: http://www.elfnet.org/2011/11/30/sdl-undefined-reference-img_load-solv... (by Ceset)
by Zyl
Why do virtual enums compile when they cannot be defined in derived class?
 
Assume this class: class GenericTrafficLight { public: virtual enum LightState; void setLightState(LightState newState) { currentState...
[5 replies] Last: GCC reports two errors for this line virtual enum LightState; mai... (by andywestken)
by andrix
template class for binary_tree
 
hi i was writing a class template for a binary tree,here's my code: template<class T> class binary_tree{ private: class node{ public: T ke...
[1 reply] : Where do you get an error? P.S. Here is the ordinary function that I u... (by Snaksa)
std::unordered_map with class data
 
I'm trying to make an unordered_map with a key of std::string and a data type of my own class, "Variable". This is my code that I've done: #include <iostream...
[4 replies] Last: Thanks, that fixed it! (by TwilightSpectre)
problem about printer operator
 
I have a problem about printer operator defined in the following class: #include<cstring> #include<iostream> enum tipo_contatto{CELLULARE,CASA,UFFICIO,FAX,E...
[1 reply] : the problem is that you don't have const for the operator<< in DbLi... (by coder777)
const after member function
 
#include<iostream> using namespace std; class Student{ public: int age; int rollNo,marks; string name; void AddEntry(); void...
[7 replies] Last: Then as already suggested by Daleth, you will have to make Display eit... (by abhishekm71)
fails before it starts
 
Hey guys my program just took a turn for the worst, it starts handing out unhandled exception before it starts executing, before main. It shows chkstk fun...
[7 replies] Last: > i get a whole list of warnings It might help if you pay attention t... (by JLBorges)
Variable length integer multiplication
 
I already have the standard one that mimics the one taught in schools written but I've found that there is a faster formula that can be used however I not sure ...
[6 replies] Last: I'm aware of how small 8 bytes is but the point is the program I'm mak... (by awsdert)
int to char
 
Hello, I have a problem, I was assigned to print a linked list but as a vector of char (I cannot use the normal string type) ,this is what I have: char* List...
[7 replies] Last: Ok, thanks a lot (by jmyrrie)
Radix sort question
 
I have a question about this algo: http://i.imgur.com/aax89z7.png int N = a.length; int count = new int ; for (int i = 0; i < N; i++) count[a +1]++;...
[5 replies] Last: Thanks a lot, helios. (by yelnatz)
August 2013 Pages: 1... 34567... 28
  Archived months: [jul2013] [sep2013]

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