General C++ Programming - June 2011 (Page 23)

Template Class Question
 
I am making a Template class and want it to have private iterators on it but there's something I'm missing about syntax and would like guidance for doing this r...
[3 replies] Last: So it should be typedef typename map<unsigned, T*>::iterator myIterat... (by ne555)
How do I make a text based game?
 
I've been trying to make a text-based game, not like Rogue, but like where the console will ask you a question, and you press 1 or 2. I've been using a cout/cin...
[3 replies] Last: [quote=dallyO]every way I try, the first question would work fine, but... (by closed account zb0S216C)
Design Patterns and Decorator : Pizza store
 
Hello I need to use Design Patterns with Decorator in order to implement a Pizza delivery (or Pizza store,just the same) . I have the regular Pizza with no ...
[8 replies] Last: I agree wtih kev82. A simple template could be: template<const char... (by webJose)
How "break" works
 
Hi, My doubt is the funcionality of the "break". It is used mainly for switch control structure, but in other cases, a lot of people use it into a functi...
[6 replies] Last: The declaration of i isn't quite right in that example. (by kbw)
Yet another enum question
 
See the following enum: typedef enum _StdTaskDialogIcons : short int { TDIconWarning = -1, TDIconError = -2, TDIconInformation = -3, TDIconShield =...
[4 replies] Last: I see. Well, I'll post @ the MSDN forums to see if I get another ligh... (by webJose)
How to display all marks and there occurances
 
Hey guys, I've created a code that teachers can use to enter a students mark, find the average, s.d and how many occurances a certain mark has been entered. Th...
[1 reply] : As far as my undertanding of the question...you can easily implement i... (by Adee)
A constant If statement
 
Hi, I have always wondered if it is possible to have an if statement keep running without having to constantly write it. I have tried using loops but that didn'...
[4 replies] Last: An expression within a if statement cannot change, only the result. ... (by closed account zb0S216C)
Add values to an Array with a for loop?
 
I'm making a game in c++ that requires a board using an array, but each array needs a value for the spacing to be correct in the board. I made the board before ...
[4 replies] Last: That worked perfectly, thanks very much! (by Nekoyasha)
conversion of double to complex<double>
 
Hi, all. I have a question about the conversion of double to complex<double>. I defined operator+ between MyClass and complex<double>: const MyClass operator+...
[1 reply] : std::complex doesn't define any such constructors, so no. The best you... (by helios)
by bacpp
exporting variable to child instance of make
 
hi, I am trying to export a variable from the parent makefile to a child instance of my makefile within the same directory. the relevant code in my parent make...
[3 replies] Last: thanks...I just figured out I was making a dumb error, I should keep t... (by bacpp)
String and loop problem
 
Hi, I am somewhat a beginner at C++ and i have been making a text adventure game lately. I put in a fun little easter egg when you type in your name as a swear ...
[2 replies] Last: As a general rule, if you find yourself copy/pasting things, you are p... (by Disch)
File Opening From Filepath
 
Hello, I have a problem of opening a file. The function is given as: OntologyTree::OntologyTree(const string& ontologyFilePath) I try to open it by the fol...
[1 reply] : fstreams need a const char* (for some reason...I don't know why honest... (by firedraco)
by Mat001
to print a single column as multiple columns
 
hi, Here is my problem. How would you change this 20 lines long column output into 4 parallel columns? With cout, no arrays: 1 2 3 4 5 6 7 8 9 1...
[4 replies] Last: cheers guys, hamsterman was the closest. A neat solution :) ** data ... (by Mat001)
by coffee
Invalid input causes undesired loop
 
Hello, I am currently independently studying C++ before I reach my classes in the Fall. I have been tinkering with programming a special calculator. Unfortunat...
[3 replies] Last: Thank you for the help. I am trying to shy away from using other's wor... (by coffee)
by ramako
EOF with getline?
 
Hi folks, I am trying to read until the end of file with the function cin.getline() I tried cin.getline(mensaje,200,'EOF'); But it won't work, it st...
[9 replies] Last: Seems it will be useful, I'll try it out tomorrow since I must go to s... (by ramako)
Capital Letter Function
 
Hi, Could anyone please tell me what does a function in capital(all capital) letters indicate? I have a cpp file which exports function.At the end of it ...
[5 replies] Last: Thanks for the reply. I was looking at the documentation page and I f... (by statesman)
class and table
 
Hi all i'm newbie in C++ so i got some questions because our teacher is sooo stupid and he never answer in any question T_T first of all hi to all! 2nd i creat...
[3 replies] Last: Sorry friend, I contribute to this site during down time at work and s... (by Computergeek01)
text file
 
hi can anyone help me in this program.if i delete one record usig the id the program will delete all the record in the text file.please help me tq #include<i...
[2 replies] Last: - You're using the std namespace without declaring so. - You're usi... (by Computergeek01)
goto previous goto statement
 
what i'm trying to do is: 1: /*code*/ 2: goto a1; /*goto 1*/ 3: /*code*/ 4: goto a1; /*goto 2*/ 5: /*code*/ 6: a1: 7: /*code*/ 8: /*mystery command*/ the orde...
[6 replies] Last: +1 Athar @ OP: You are describing functions exactly. (by Computergeek01)
Help getting started
 
Good day everyone! Ok so here is the down low. I am an intermediate C++ programmer and I am looking towards what I want to do in the future. That would be vi...
[6 replies] Last: In regards to the cross platform idea: http://www.winehq.org/ Every p... (by Computergeek01)
June 2011 Pages: 1... 2122232425... 28
  Archived months: [may2011] [jul2011]

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