General C++ Programming - February 2013 (Page 11)

by cob
Not very efficient
 
Hey all! As stated many times, I'm working on this rpg from this tutorial blah blah blah. But, I've hit a snag with the items system so, I went back and looked ...
[8 replies] Last: That's seriously intense stuff! Any recommended readings on the subjec... (by cob)
Puzzle Solver for Flow Game
 
Hello, all. I'm new to this site and forum, as well as, to a degree, C++, itself. I've distinguished myself among my other class mates, and as a result the ...
[2 replies] Last: It could be solved kind of how most game ai is done using game boards.... (by K0T4K0t4)
Confused with pointers - what real purpose do they surve?
 
I thoroughly reviewed many tutorials on this, and from what I can gather a pointer is a data type, basically meaning it's a byte(s) that reference other bytes? ...
[1 reply] : "Why should data point to other data?" Pointers are what allow you to... (by K0T4K0t4)
coding a loop inside a class to use in main
 
I am writing a program where all work is done in the class methods. Main is used to call the methods. I need to know how to get a loop to work without any var...
[3 replies] Last: Great, glad to know! You're very welcome. (by Ogoyant)
Accessing A Classes Member Variables Nested Inside Another Class
 
I have two classes, a Package class and a Person class. The Package class has two Person objects has member variables, a Sender and a Receiver. While overloadi...
[2 replies] Last: Thank you, it was so simple I didn't even think of it. (by Rusticus)
problem with c++0x
 
Hello, I am using Eclipse as my editor and trying to work with boost. Here is my code. #include <boost/mpl/for_each.hpp> #include <boost/mpl/range_c.hp...
[no replies]
while loop age guess
 
Write a C++ program that uses a while loop to guess a persons age, ask the user if the want to try again if no end the loop. Of course if they guess it the loop...
[3 replies] Last: int guess = (rand() % 100) + 9; //guess from range of 0-100 Is a ra... (by Smac89)
Hi programmers Please comment
 
I spent 6 ours on it although i didn't include Modify and delete in the menu but all i want is that please comment is it good or this needs more improvement ...
[1 reply] : and please don't comment about the spellings mistakes i know my spelli... (by Sarmadas)
please correct my attempt to resolve these questions....
 
question 1: By using linked list ADT write a program that manages students list. The student is characterized by (Name, ID and Level). Linked list should b...
[2 replies] Last: This looks like a homework assignment? Perhaps try to rephrase your q... (by vckngs7)
by Phiru
copy class object??
 
I have a class A for a sort of a template. class A { A(){} A(int n){a = n;} int a; } In main class, I create like this. A *temClass = new A(10); ...
[5 replies] Last: Or don't use java A tempClass(10); A myClass01; //default constructo... (by ne555)
Help needed - Type Casting
 
Hi, I am new to static_cast. Can somebody please explain me the output for below 2 cases : case 1) in class A use void display() - output-> In B case 2...
[10 replies] Last: Thanks @cire and @kbw for your inputs. (by ngoyal1987)
Multiple Inherritance, Composite Classes and Ambiguity
 
I am building a series of classes to describe objects similar to cars. Each car class contains state variables that are relevant to the data available at any gi...
[no replies]
Setting limit on cin
 
I want to set limit on cin for example int i; cout<<"Please enter 4 digits id: "; cin>>i If user enter more then 4 digits it must give an error...
[5 replies] Last: @peter87 i'll try thanks i (by Sarmadas)
Double Triangle problem
 
Hi everyone! i wrote code for printing a double triangle. Its woking fine upto input is 7. but when the input is 8 the output is disturbed. can any one suggest...
[3 replies] Last: thanks man... (y) (by imnotprogrammer)
Queues program suddenly stops working
 
I'm having troubles with this program I made. Put it simply, it's a basic program using Queues. Whenever I try to input a value, my compiler(Dev C) suddenly sto...
[1 reply] : A lot of things don't make sense here. 1. You did not declare a queue... (by Smac89)
Passing a list
 
Quick question... how do you pass a list in to a function... For example for void reverseList what would the parameters be for my function... I'm trying to ...
[2 replies] Last: yea thanks bro... (by VANDEMAN)
by shakib
Qt GUI
 
Hello, I have downloaded both Qt 5.0.1 and Qt SDK, but libraries like <QApplication> and <QLabel> and so on cannot be recognized by the compiler. Is there an...
[no replies]
Qt Installation
 
Hello, I've downloaded Qt from their website. I downloaded: Qt libraries 4.8.4 for Windows (VS 2008, 233 MB) I was enjoying a tutorial on how to use it but s...
[3 replies] Last: Hello. I'm sorry for my English in advance, because I'm from Kazakhst... (by judarical)
signed number question
 
#include <iostream> #include <cstdlib> #include <math.h> #include <climits> using namespace std; int main() { // SHRT_MAX = 32767 short s1 ; s...
[11 replies] Last: It may have been the reasoning why it was left undefined historically,... (by Cubbi)
Function argument as array size
 
Hi, I made a function like follows: void foo(const double va, const int q) { int qaa ; ...... return; } However, the compiler indicate...
[8 replies] Last: Thanks to you all for your answer! (by dekeenfrance)
February 2013 Pages: 1... 910111213... 43
  Archived months: [jan2013] [mar2013]

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