General C++ Programming - September 2013 (Page 31)

How to call the function ?
 
My dear friend, How to call the function in different file. 1 main and 5 function. I'am not sure to create the function to call each by one in different file....
[5 replies] Last: Now I can understand. Thank you Maeriden for help... :) (by ajith55)
Tree functions.
 
I tried to make a tree function based on a binary tree tutorial online. This is my version and their version (theirs) struct node { int key_value; n...
[2 replies] Last: Of course i am trying to make a n-nary tree . (DUH!!!) (by sharan2002)
by Smac89
Set member to same value in all instances of templated structure
 
template <typename T> struct avl_tree { T data; int balance; struct avl_tree <T> *Link ; static int (*comp)(T, T); }; In main, I have a function...
[12 replies] Last: > What is line 51 and 70 doing? These involve lambda expressions (or ... (by JLBorges)
mallo/free issue
 
Can some explain me how this code disturbs the memory partition blocks char* p = (char*) malloc(100); memcpy(p,somedata, 200); free(p) // I am getting...
[6 replies] Last: well, with this 200 you overwrite the next block of memory (especiall... (by kulkarnisr)
by franc0
Classes division
 
I am learning C++ and i am on the topic classes(Inheritence),my friend told me that the way I am writing code is bad software engineering and said me to divide ...
[7 replies] Last: Nice work. In addition to the safe guards keskiverto mentioned (which... (by plexus)
building boost
 
so i need to use boost/regex for regular expressions. someone told me that it needs to be built. the first problem is boost doesnt tell you how to build it (i d...
[2 replies] Last: not for boost.regex edit: i apologize... i found it... i dont know wh... (by closed account Dy7SLyTq)
by zanzi
ADD and deduct points from word jumbel
 
Please can some one help ( need to deduct one point for each guess and need to deduct two point for using hint) I copy this code to practice am new in C++ i do...
[1 reply] : 1 : Your game has only one round so using a score has no meaning 2 : ... (by closed account 28poGNh0)
Constructor with 2 array parameters
 
I'm making a flash card program for Chinese and my current plan is to have a class "Card" and have 2 Uint16 arrays stored in it. Is there a way to pass both ar...
[no replies]
A question about outstream operator function
 
There's requirement on my assignment that says: The class needs a helper function to be called by outstream operator function. What does it mean by this? I have...
[no replies]
by zionet
As I can order several test cases, while receiving data???????
 
PROBLEM As I can order several test cases, while receiving data??????? MY PROBLEM entrance The entry contains the number you want to represent in binary...
[3 replies] Last: EssGeEich is right. Your code should work. I compiled your code with ... (by funprogrammer)
Game Engine Design w/ Allegro 5
 
Hi, I am curious on how to keep something OO in this scenario. Lets say I have a base class called Base and it looks like this: class Base { pub...
[3 replies] Last: I am sure there are a bunch of tutorials online that explain Scene Gra... (by closed account 3qX21hU5)
SFML 2.0 Change Cursor
 
Does anyone know how to change what the cursor is in sfml 2.0?
[1 reply] : https://github.com/LaurentGomila/SFML/wiki/Tutorial:-Change-Cursor (by cire)
Serial Port Communiocation
 
In the code below I am effectively only reading from a serial port(although a writing handle is also implemented). I got the main part of this code from some te...
[no replies]
Using outfile to write name PLEASE HELP
 
I am trying to display my name using outfile vs. cout and I get errors I don't know how to fix. Here is the code: // Johnakin Martin //This program will cal...
[1 reply] : Try to alter this statement outfile.open<<("monthly payment"); to o... (by closed account 28poGNh0)
How do you not pop from an empty stack?
 
Solved! Thanks!
[2 replies] Last: void compute(const string& variable, stack<double>& rpnStack) { d... (by JLBorges)
Dynamic Class name?
 
Hi I just wondering if there's a way in C++ to get classes dynamically which have the same base class? I mean, instead of creating switch statement to create m...
[4 replies] Last: I guess there's no shorter way to create the dynamic class. C++ isn... (by closed account o1vk4iN6)
by celyn
programming
 
how can I create a program that will accept 2two integers. the user will also choose among the different operations: 1 for addition 2 for subtraction 3 for ...
[4 replies] Last: # include <iostream> # include <conio.h> using namespace std; void m... (by closed account 28poGNh0)
Question regarding Wide character
 
I have question regarding wide character. I have been reading article saying that this datatype is used for non latin characters for example Japanese or Chinese...
[2 replies] Last: It is implementation-defined, which means it differs between compilers... (by Cubbi)
How do pointers to virtual member functions work and why are they different than pointers to non-virtual member functions?
 
Hello, this is my first post to the C++ forum. I have been asked by a potential employer to become an expert on all things relating to virtual functions and ...
[1 reply] : The Fast Delegates article is a good place to start http://www.codepro... (by Cubbi)
too few arguments!!!
 
Hi to All!! //I am new to cpp forum, and this is my first post.Please pardon if i have made //any mistakes while creating this thread. I am getting error:"In ...
[2 replies] Last: Gotcchhaa!!! Thanks for the reply ,,I deduced where i was making the m... (by satyaki)
September 2013 Pages: 1... 2930313233... 36
  Archived months: [aug2013] [oct2013]

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