Beginners - November 2013 (Page 61)

question about my deconstructor
 
1. Will my deconstructor delete the object `next` and `previous` or just the pointer? I want it only to delete the pointer. 2. let's say i have ofxDTangib...
[5 replies] Last: <offtop> Silvestar , you barbarian! Some peaople just want to keep th... (by JockX)
by wwcase
Not sure how to read this line
 
I am wondering how you read this line of code: for(const char*c = inputLetters.c_str();*c; ++c) I understand the inputLetters.c_str() and the ++C, but what do...
[1 reply] : for(const char*c = inputLetters.c_str();*c; ++c) // is the same as co... (by keskiverto)
Q5.Problem
 
Q.5. output 10 is clear but why is there 0 in it ? const int ARRAY_LEN=100; int main() { int arr = {10}; // Note implicit initialization of // oth...
[7 replies] Last: Thank you :) (by Sharan123)
Q3.Problem
 
Q.3. Why does decleration of char with out pointer datatype causes error for example const char suitNames = {"Clubs ", "Diamonds ", "Spades ", "Clubs...
[9 replies] Last: Thank you its clear now :) (by Sharan123)
by AGZZ21
Using Arrays on Wargame
 
I'm making a WarGame program (a game where you use cards). Anyways I pretty much have the whole main function but I am stuck on two of the functions needed for ...
[1 reply] : void splitArray may loop through all items in source array and deter... (by JockX)
Number of Elements in an array of objects
 
I am trying to get the number of objects present in an array of objects, but it fails everytime. The code is as below: here im trying to do the for loop withou...
[2 replies] Last: agree with the Zhuge (by nashge)
How to find the smallest number in array?
 
I figured out how to find the largest number in array but I can't seem to figure out how to create a function to find the smallest number. Starting at Line 160,...
[5 replies] Last: It isn't obvious why you would be getting stack overflow. The error w... (by cire)
guessing number
 
i made half of the program but i can not make the computer guessing system more efficient can you make it solve by only if computer takes less than 7 guesses an...
[8 replies] Last: Yes if its exactly 7 its still ok but it gives an average of 28 counts... (by Sharan123)
array of objects
 
I have a the following classes: parent classed called "CPolygon" and its child class called "CTriangle" and "CRectangle" In the main function how do I crea...
[7 replies] Last: No problem :). Just select this topic as Solved. (by tath)
Void Function Error
 
I have made three functions. I have yet to make more functions. On selectseries function, I have entered the parameter as Enterchoice. Not sure if that is c...
[3 replies] Last: Can I not use it though? sure you can. similar to print_series1 : vo... (by coder777)
Old C++ book - Newer C++ tutorials
 
Hello, this is my first post and I've started to learn C++. I noticed that the book I'm using was published in 1995. Then I started looking at newer tutorials l...
[4 replies] Last: In the second example you can put the line: using namespace std; above... (by Scott7975)
by hilft
throw and catch help!
 
can someone explain me the steps that was involved to get the output of 4? X::c was 0 at the beginning and I'm completely lost after that. #include <ios...
[1 reply] : You start with f(2), so i=2. On line 20 when you create X(i+1) you set... (by ats15)
by hilft
try and catch help.
 
Can someone explain me why the output is 01? I don't even understand how the compiler can run this without compilation error. it is supposed to catch s, which...
[6 replies] Last: thank you so much for the supports, wow you guys are fast. I keep fail... (by hilft)
Program that changes numbers to day of year
 
I have to create a program for my class. The instructions are to allow a user to input an integer and display the month and day that corresponds to the entered ...
[4 replies] Last: Yes, it did. Problem's solved now, thanks for the help (by pepstein)
first programme :D
 
first programme with c++ language Notes?? #include <iostream> #include <cstdlib> using namespace std; void dessineRectangle(int l, int h) { for(int...
[7 replies] Last: really i like it , that make me think with different way than the othe... (by BlackBug)
going up a menu - 'the BACK button'
 
Hi, I am using the command window executable file to run my program. I was wondering if anyone knew a better method to be used to go up a menu : say that you w...
[1 reply] : char x; //To validate the choices do { //User chooses every ci... (by Annatar)
Object Containment
 
A couple months ago, I decided I'd like to learn some basic coding skills, so I bought a book called "Beginning C++ Through Game Programming." Most of the conc...
[4 replies] Last: Cool, thanks again! (by Explodey)
by tep122
What is wrong with this? Can't get it run, there are no errors
 
Write your question here. Here is what I need to do... Write a program that will call a function from main that will return the number of gallons of gas an in...
[1 reply] : Lines 12 and 13: double gall; while(gall<-1) {//... You're using a ... (by xismn)
Tic-tac-toe
 
Hey. I'm having a little problem. Im almost done with my tic tac toe . Just when checking at last who won ..I had to write around 12 if-statements . I was wonde...
[4 replies] Last: There are easier ways of doing this, using a 2d array, using numbers (... (by CplusplusAcolyte)
if (x <= value <= y)
 
Write your question here. Correctly recode the statement: is x<=y correct?
[3 replies] Last: if ((x<=value)&&(value<=y)) { do something } (by alhajee)
November 2013 Pages: 1... 5960616263... 80
  Archived months: [oct2013] [dec2013]

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