General C++ Programming - April 2012 (Page 28)

by komp20
2 dimesional arrays inside the class
 
Hi everybody, I want to declare a two dimensional array inside a class as a private member but I get an error message.Do you have any suggestions ? : #incl...
[4 replies] Last: How interesting! I tried this out with: out_stream.open("c:\\my.txt... (by Stewbond)
by Bouya
Callbacks
 
Hi I discover for the first time the callbacks, from waht i read , i think that allow exchange between class. But did any one know where shoud i use them, i...
[2 replies] Last: Here's a common one: http://msdn.microsoft.com/en-us/library/windows... (by Stewbond)
appending one linked list after another.
 
Write an Append() function that takes two lists, 'a' and 'b', appends 'b' onto the end of 'a', and then sets 'b' to NULL (since it is now trailing off the end ...
[2 replies] Last: When playing with pointers (and linked lists), you should always get o... (by Duthomhas)
OpenGL Normal vector
 
Hi. I have a few questions about normals in OpenGL. 1. Should I put glNormal3f function before vertices declaration or after that? What's difference? I mean:...
[3 replies] Last: Thank you both ;) (by majidkamali1370)
by jalda
Template specialization for template types
 
I'm programming a template class Vector in order to perform algebraic operations: #include <ccomplex> template <class T> class Vector{ //... public: ...
[8 replies] Last: And I can't overload conjugation because is only a function defined f... (by jalda)
c++ QObject's Child Management
 
#include <QApplication> #include <QLabel> #include <QVBoxLayout> #include <QTextEdit> #include <QWidget> int main (int argc, char* ...
[1 reply] : This is not the right place to ask about Qt. I think you wanna go try ... (by TheDestroyer)
by applee
Inheritance
 
Hi! I'm having trouble with multiple inheritance. I'm supposed to write a program for chatrooms, the situation being this: -A chatroom contains a name, a ...
[5 replies] Last: Ok, but is there also a way to solve the problem using class instead o... (by applee)
by sisi
return object or address
 
Hi all, I have this kind of class: class A { public: typedef std::list<std::string> MyList; private: MyList list1; }; And I want to implement a function wh...
[2 replies] Last: Ohhhh yes, right!!!! I knew that a.getList() will return a copy of my... (by sisi)
Creation of a file system
 
There's something I've wanted to know for a while that seems pretty hard to find information on online, but in theory sounds like it should be available. I'm tr...
[1 reply] : This should get you started: http://thecoffeedesk.com/geocities/rkfs.h... (by JLBorges)
SFML - C++ displaying a sprite help
 
I've been learning sfml lately and im trying to create just really simple games and applications to help learn. I saw on the sprite tutorial that puting the ima...
[8 replies] Last: Works now! Thank you so much for the help, love the people here. (by Need4Sleep)
I try to figure out the Median of my array
 
the only number i get is the second last number of my inputs. for(int outer = 0; outer < 14; outer++) { min = numbers[ outer]; indexOfMin = outer; for(int...
[2 replies] Last: Given an array named array of size n . Sort array. if (n is even... (by cire)
by Baelix
Recursive Polynomial Help
 
So, I'm writing a program in which we iterate through a for loop to display the different factors of a polynomial, which I've already finished. However, I was w...
[2 replies] Last: Hopefully I don't sound too dumb here, but would you break that down a... (by Baelix)
How do i get results from a query and print them as a string in c++??
 
I can connect to my mysql server alright by using "mysql::initialize", and i can send querys properly using mysql::execute("INSERT INTO users ect........") but ...
[no replies]
Unknown error!
 
I switch to mysql for my server recently, and it comes up with "Crystal online.exe has stopped working..." Then i click debug and theres a green arrow pointing ...
[10 replies] Last: I tried it, it worked, BUT it doesnt allow you to remove stuff from th... (by killerloader)
by khal
Template Queue
 
#ifndef QUEUE_H #define QUEUE_H #include <cstddef> template<class T> class Queue { public: Queue(); bool isEmpty(); void...
[7 replies] Last: As far as I know the using namespace std is not require in a .h file ... (by ne555)
by yotic
count function for queues
 
I need some help with setting up a count function for this code that i have. I'm not at all sure how to edit the code in there and my teacher explained that i h...
[6 replies] Last: i think i got it, i looked up different types of solutions to this pro... (by yotic)
how to print the content of vector of variant of vector
 
Dear Pls look at my code, When I try to print the content of vector of structure of variant of vector the following big unbelievable error even it is very s...
[6 replies] Last: Again, it's irrelevant that you are using boost::variant Define som... (by ne555)
by xKeb
Char Encryption
 
So, pretty much, I have to read in chars from a file. Then I have to encrypt them. Then encryption code is if ((originalChar + encryptedKey) > 126) { en...
[1 reply] : To use strings and getline, you'll need the string library. Getline wo... (by krakissi)
by baki
Error in trying to compile a program of a guessing game
 
Say you pick a number, you are given ten attempts to guess it right if you're right display CONGRATULATIONS!! and then end the program. But if you finish the te...
[3 replies] Last: //THe character that they sayer higher or lower to: H, L, W will be ... (by shaggy)
by shaggy
text RPG help
 
Hello i decided to make a small text base rpg game, but i might add a GUI with SDL when im done. It is based on real life and nothing is unrealistic in it. I wa...
[1 reply] : Main Question: That would be something you would have to figure out, d... (by firedraco)
April 2012 Pages: 1... 2627282930... 49
  Archived months: [mar2012] [may2012]

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