Beginners - October 2014 (Page 61)

Asterisks
 
I am doing homework, but I am lost on while statements. I know this is currently if for/if, but every time I try to switch it up to while, I get confused and s...
[7 replies] Last: Adding "cout << endl;" after the "while (y <= x )" loop produces the o... (by Esslercuffi)
by anup30
How can i see time consumption?
 
i have two reverse function below, i think they don't consume equal time. although they take minute time, can i see how much time each of the takes? or how mu...
[2 replies] Last: Thank you. may you live long :) (by anup30)
Having issues with my linear linked list
 
I am trying to create both a minimum heap and a linear linked list to store values in order, listing the amount of comparisons that take place in each of them. ...
[5 replies] Last: Still can't figure this out. Still displaying the values in the wrong... (by Spectre216)
by Nezar
How can one avoid opening a file that doesn't exist ?
 
Hello there, I've written an object oriented program that simply counts and returns the lines of a file. The program takes a command line argument as the name...
[2 replies] Last: Oh, what a stupid bug, how could i miss that ?!!! o_O Thanks bro :) (by Nezar)
by iluv41
my constructors only run once
 
I have 3 constructors. One default constructor, one constructor with 1 parameter, and one constructor with 4 parameters. I am trying to define 5 objects. The...
[2 replies] Last: hey there, Let me see your code :) (by Nezar)
by iluv41
identifier is undefined
 
So I know the error "identifier "Convert" is undefined" probably has something to do with the way i am calling it, but i cannot figure out how to fix it. The f...
[1 reply] : Convert is a member function. That means it can only be called on clas... (by MiiNiPaa)
by Daviid
I dont know if this is possible, but i need some help
 
My class is writing a text adventure game, but we haven't learned all of what we need to do it. so we were told to use case switches to go from room to room. I ...
[9 replies] Last: I think i can get it from there. thank you for the help (by Daviid)
cannot initialize array..
 
I am getting an error message when i am trying to initialize an array. int rute(int goalx , int goaly , int startx , int starty , int **array ) { int x...
[3 replies] Last: Replace int decision = {0}; with int decision = {array[x+1] , ar... (by shadowCODE)
Switch structure using char
 
my switch structure keeps exiting and I don't know why.. I had it working great until I switched from int to char in order to add case Q. *************...
[8 replies] Last: please post your code you'r working with so we may help (by closed account SECMoG1T)
How to implement?
 
I am trying to implement the pseudo code described here http://www.societyofrobots.com/programming_wavefront.shtml but i do not understand how i check b...
[1 reply] : The data on the "boundary nodes" is coming from his IR sensor on top o... (by Computergeek01)
Help with an array
 
I am trying to write a game where you need to try to guess the random number between 1 and 100. The basic code is a simple do-while loop and it works normally. ...
[5 replies] Last: Since you had not initialized i, the value stored in i was just whate... (by Esslercuffi)
Can somone help me with this?
 
Can someone help me with this? I dont understand what they are asking for. So if somone could maby do the first exersice or something, that would mean the world...
[no replies]
It WORKS!!
 
guys i know it may not seem like much to you that this little program works but i'm fairly proud that i achieved my goal c: i shall share it with you all. I ...
[18 replies] Last: I meant conceptually from a high level: #define VAL 3.14 const doub... (by Disch)
Re Program 19
 
Hello, there was a bug in the original program so I fixed it so that it compiles. #include <stdint.h> #include <limits> #include<iostream> int main() ...
[6 replies] Last: I know it`s a known problem. I would fix it like this: #include <s... (by pacman169)
while loop conditions
 
I am having a hard time coming up with a solution on how to write my conditions for my while loop. The while has to terminate when both x and y equals star...
[5 replies] Last: terminate when they are equal... (x == start_x && y == start_y) →... (by MiiNiPaa)
begin() function on pointers/arrays
 
Hi am having problems understanding the difference between a. #include <iostream> #include <algorithm> using namespace std; int main() { const...
[4 replies] Last: I was very confussed, i meant That ws example of equal() finction, n... (by closed account SECMoG1T)
tictactoe
 
how could i reset the board when the game is finished?
[3 replies] Last: yea i tried it but did not work. You did it wrong then. (by MiiNiPaa)
Problem with including self made headers & cpp files
 
Hello, to avoid losing the track of my code, I decided to make a little "library" (not a real library lib.a but a separate code section lib.cpp with its own he...
[7 replies] Last: Yes, but linking will fail as it cannot find definitions for used fun... (by Binary91)
Random Number Loop,
 
I have almost completed what I think is what I want from the program, except one of the loops first prints out a strange number and the rest of that loop seems ...
[13 replies] Last: Thanks! (by programmile592)
Problem with Input failure
 
I'm learning some first C++ lessons. In the Input/ouput section, according to the code on the book #include <iostream> using namespace std; int main() ...
[4 replies] Last: @MiiniPaa: Thank you. I got it. So the problem is the difference betwe... (by quan1506)
October 2014 Pages: 1... 5960616263... 70
  Archived months: [sep2014] [nov2014]

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