General C++ Programming - May 2014 (Page 20)

Calling an object within a class
 
class abc { public: int i; abc * foooo; }; How do you call * foooo? Say I create: abc a; * foooo would have some values for int i. To get int i of...
[5 replies] Last: Look at it this way - a->b is the same as (*a).b . Now, in your pr... (by TwilightSpectre)
Hello
 
I was wondering if i can get some help answering these questions or pointed in the right direction. 1. How does a function pass control back to the calling ...
[4 replies] Last: For 1), when a function is called the location from where it is called... (by TwilightSpectre)
Random number generator
 
I have spent hours on this program, and I cannot seem to get the game to run properly. The Random number generated for game1 is ALWAYS 24, and it is always 1 fo...
[11 replies] Last: For quitting, there are a few options. The two easiest are either (if ... (by TwilightSpectre)
Counting letters
 
I have to count the letters from a text file into an array so the first spot is the number of A's second spot number of B's and so on then take the array and so...
[1 reply] : What have you done so far? (by iQChange)
Problems getting correct numbers
 
I am a beginner at C++, the output is pretty self explanatory. I'm trying to make a number sorting program with other features, but the numbers are all wrong. ...
[2 replies] Last: Score Range No. Average Lowest Highest No. of sc... (by Kamiden)
overrride\change functions
 
can i create a functions in base class and edit them in new class(derived from the base class) without redeclare them? (i'm loking for a long time about these, ...
[7 replies] Last: So that the compiler can know to call the overridden one rather than t... (by TwilightSpectre)
Need help...constant error.
 
:( Using Code::Blocks... Current objective: Prompt the user for two characters. Output the movies that begin with those two characters. What my goal was to ...
[1 reply] : check is a std::string. mlist .name is a char.... (by Peter87)
by poteto
Making a packet in boost asio
 
I need to make this simple chat program: http://www.boost.org/doc/libs/1_55_0/doc/html/boost_asio/example/cpp11/chat/ To send a generic packet instead of a ...
[2 replies] Last: Thanks! (by poteto)
Changing virtual function output without using any data member
 
Instead of this: #include <iostream> struct Object { int size; // Want to avoid this because size is (almost always) constant Object (int s): s...
[5 replies] Last: @Peter87, so you are saying that giving the int size data member to B... (by cire)
Help!!! Sfml graphics engine tutorial
 
I'm trying to write an engine for a game using sfml. I need the engine to draw sprites with or without animation and i want to be able to move the objects as we...
[no replies]
by C888
Test Help!
 
Hey .. new to C++ and need help writing this short program ...... Given an array of angles A = [0 30 60 90 120 150 180 210 240 270 300 330 360] write a prog...
[2 replies] Last: finally got some help from the teacher but still confused using loops ... (by C888)
Segmentation fault (core dumped)
 
Anyone know why this gives me segmentation fault? #include <stdio.h> double atof(char s ); int main(int argc, char *argv ) { int i; char *...
[1 reply] : > for (i=0; *strings ; i++) You are dereferencing a NULL pointer.... (by ne555)
Table of variable size
 
Hello, I would like to create a table but I dont know how big. Thats why I want to use variable to describe its size. Something like that: int x = 5; //I w...
[4 replies] Last: Thanks for you help ;) (by Furjoza)
Binary Search Tree Remove
 
I don't know why, but my remove function doesn't seem to operate properly. The rest of my code is fine, so I am trying to pinpoint the exact location of my erro...
[2 replies] Last: Ok I think I see what you're saying. On line 35, I should return root,... (by foodyore)
Help c++
 
What is wrong in this functions ? i'm trying to make a memory writer and reader, but when i compile then shows : In function 'int main()':| |81|warning: c...
[1 reply] : YOu are trying to pass integers when you need pointers (DWORD) And you... (by MiiNiPaa)
Give error !! bool
 
#include <iostream> #include <string> #include <iomanip> using namespace std; class Car { private: string reportingMark; ...
[4 replies] Last: @sarak786 And leave off both of these 'A.' in if(A.reportingMark =B.... (by whitenite1)
for and do while loops
 
I this notation: for (; *strings ; i++) the same as: do { i++ } while(*strings ); ?
[2 replies] Last: for loops: 1) initialize (everything between the '(' and the first ;),... (by Little Bobby Tables)
Error C2065 with Allegro 5
 
Hello, i'm having a problem with my c++/allegro programming it's saying that playerkm is an undeclared indentifier. I don't know what to do and I hope someone ...
[2 replies] Last: ne555, many thanks! I appreciate your help :D (by martin045k)
by Medino
I'm stuck!
 
Hey guys, I'm trying to write a code that will calculate this equation y^3=x^2+4 I've got it sorta figured out, but I'm having some problems with cbrt function....
[5 replies] Last: Solved it myself, but anyway thanks guys for the help. Don't worry Dou... (by Medino)
Increase framerate of software rendering (VGA in emulator)?
 
My software is currently running at INT13 mode 2/3 (80x25 text mode,720x400) with about 1-2FPS. Every pixel is drawn using the following steps: 1. Character...
[3 replies] Last: I've made the loops into simple jumps, because they run faster than t... (by helios)
May 2014 Pages: 1... 1819202122... 31
  Archived months: [apr2014] [jun2014]

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