General C++ Programming - December 2013 (Page 12)

by ritfol
Account class
 
I am trying to write the code for the following program "An Account class that a bank might use to represent customers’ bank accounts. Include a data memb...
[1 reply] : Here, I wrote a possible class declaration for you. class Account { ... (by xismn)
[help] reading a file
 
So, I'm trying to write a program which reads a file I wrote to input data into a program. here's my file contents text1 text2a text2b text3 text4a te...
[2 replies] Last: Looks like that's what I needed. Thanks! (by roger911)
Trying to make a template output function
 
So Im trying to use function templates to create some functions that output any type passed to it, ie: template<class T> void Print_text(const T out) { std::c...
[4 replies] Last: Ahh, just figured it out. I must have been passing it an iterator, whi... (by BruceJohnJennerLawso)
PAYROLL
 
Could somebody help me out with the following program please. Everythings looks good and running beside Calculating Payroll...choice 2 and Report printing on ch...
[no replies]
Devonrevenge's stuck on a coursework question about binary search trees please help
 
You are given a pile of tests with students names in them. you need to find a particular paper. should you use linear or binary search? why? Now I just expla...
[9 replies] Last: For the first question it sounds like the papers are unsorted and then... (by htirwin)
Class member variable initialisation
 
Is it possible to initialize class member variables in their definition statement instead of using a constructor? Is the code bellow correct? class rectan...
[2 replies] Last: Yes, it's correct, but only if your compiler supports such a feature. ... (by closed account zb0S216C)
Problems with template template parameter
 
Dear all, I am trying to use the template template parameters, and I am stuck on a code that does not compile, I do not know why. Here is how I declare my...
[2 replies] Last: Hi, It seems to me that I am using some "too advanced" features of th... (by panecasareccio)
by gremio
vector efficiency
 
Hi, I have a question concerning the performance of 2 blocks of code. The code I have questions about uses a non-standard library, SFML, which is a 2d graphic l...
[8 replies] Last: For further analysis, if I transfer all pixels without displaying them... (by gremio)
global variable
 
here board id global variable Take the game board example from earlier—you might decide to create a function to display the board and have that function acce...
[no replies]
std::thread fun
 
I came to a situation where I believe spawning a new thread is ideal. Took me a bit to even get it to compile, was creating it wrong apparently. Got it compilin...
[11 replies] Last: ^ That's interesting to note, I wonder why he wouldn't put a foot note... (by Computergeek01)
How to reuse memory previously allocated
 
Hello All, I have a question about memory allocation. I have a function that calls a lot of object constructors, which in return these constructors will a...
[6 replies] Last: Thank you JLBorges, This is really what I want. (by zarzor2010)
Funky beginning to program
 
I have been coding this program that runs the game Snake. However, whenever it runs it takes a long time loading and shows all these different characters before...
[2 replies] Last: Please read http://www.cplusplus.com/articles/jEywvCM9/ and use code t... (by MikeyBoy)
Calculator
 
Hello. I want to do an calculator, like "calc.exe", in Windows (I'l use Qt, graphics), but I have problems to understand infix (Shunting Yard) and posfix (RPN)...
[4 replies] Last: Duoas, sorry, but I have searched all the page. I saw an "PSEUDOCODE"... (by iQChange)
by Ceset
statics in a class
 
hi guys. it seems everytime i use statics in a class i come across with a porblem. this time i wanted to make a class i created static inside another class. ...
[2 replies] Last: ok thx then i changed the functions to static and call them like Mai... (by Ceset)
URGENT HELP NEEDED!!! Please help.
 
Hello everyone, I need your help.I am looking for the source code for "Departmental store Management System" in c++ with graphical interface. Can you please pr...
[5 replies] Last: I am looking for the source code for "Departmental store Management S... (by coder777)
trying to remove first digit of any number
 
hi im trying to remove the first digit so if the user enters 12345 it should output 2345 the code i have works only for removing the last digit how would i go a...
[4 replies] Last: unsigned int remove_first_digit( unsigned int n ) { if( n < 10 ) ... (by JLBorges)
c-array giving me junk
 
I must be doing something wrong because i keep getting junk when i try to output this cstring. #include <iostream> #include <cstring> using namespace std; ...
[1 reply] : http://www.cplusplus.com/articles/jEywvCM9/ word_ne is completely una... (by Bourgond Aries)
by Sika
Inserting hex value and sending it at serial port.
 
I am trying to convert decimal value 1 to 32 to hex value and insert it at 4th pos of char array and send it as hex value at the serial port . My issue is it ...
[2 replies] Last: thank you (by Sika)
Nested "for" loops for counting up then down.
 
I was able to make a counter that goes up but what about down? Overall I want it to go like so.... 1 12 123 1234 12345 12345 1234 123 12 1 #...
[1 reply] : What about something like: #include <iostream> #include <vector> us... (by RadWayne)
Allegro/C++ Game [I Need Help]...
 
Hi, I made a simple game using Allegro in C++... First I will show you my full code then i will show you the problem. // main.cpp #include <allegro.h> #...
[3 replies] Last: Usually a question includes a question mark... Either way... take a lo... (by Sirolu)
December 2013 Pages: 1... 1011121314... 37
  Archived months: [nov2013] [jan2014]

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