Beginners - June 2013 (Page 30)

Reading in from txt file and making a dynamic array
 
The first reading in of values to set up an array works just fine but when i try to do the second one it seems to skipthe while loop and give me 0's for my arra...
[7 replies] Last: I agree with cire. You should remove that line from the text file. T... (by kevinkjt2000)
by aggsyb
Getting file sizes from a folder
 
Hi, trying to teach myself c++ by basically finding working code for things I need and then breaking it down. For this I am currently just using a console appli...
[2 replies] Last: There's no point in using type double for the variables as the tell... (by Chervil)
by zsteve
use class inside another class
 
Hi, I am having this problem : I want to include an object within another class, like this : <apple.h> class apple{ ... }; <pear.h> class pear{ ...
[6 replies] Last: zsteve wrote : hi, I think i should have clarified my question a... (by Rechard3)
getting many cin on same line
 
How would I get many cin on the same line? like cin >> something1 cin >> something 2 cin >> something 3 on the screen I would want the user to input lik...
[2 replies] Last: There are two separate issues here. One is how you write the code. The... (by Chervil)
2-D array sum of rows/ columns
 
For some reason my program will not add up the columns. It will print out the row sums but rounded down to the lowest integer. I can not figure out why it is do...
[4 replies] Last: *face palm* (by HSflower)
by hbkmad
A question about inputing.
 
Hi, I want to make a program that takes unknown by number commands from the user and I want the new line to be like the thing that makes the loop that takes t...
[4 replies] Last: Give me an example of what do you want. From what i understood: - user... (by tath)
Visual c++ 2010 express edition compiler problem
 
I'm trying to compile the following code using visual c++ express edition that I downloaded for free. I get a ton of errors when I compile. I just listed some o...
[4 replies] Last: Wow, I overlooked that. Most compilers will switch between C and C++ b... (by Chervil)
by jidder
Using a class with a constructor in another class
 
How can i use a class with a constructor inside another class ? E.g StateMachine.h class Title:public GameState { private: Graphics BackGround, T...
[13 replies] Last: You can have functions of the same name but different parameters. It's... (by Daleth)
by tdk93
char**array, printing only the last evaluated RPN expression
 
I made a program to print reverse polish notation of expressions using stacks the problem is that my code prints only the last expression converted, i inserted...
[2 replies] Last: Here's the complete code #include <iostream> #include <stack> #inclu... (by tdk93)
Assertion Failure
 
when I try to return from my get_total_weight function it is breaking with an error that says: Debug Assertion Failed! Expression: _BLOCK_TYPE_IS_VALID(pHead-...
[2 replies] Last: Thanks a bunch! Changing to the reference fixed the issues. (by cwright7101)
American to Canadian english translation
 
it should translate american to canadian english for example color into colour, for shoud be for and if the user enter quit! the program shoud terminate. #...
[1 reply] : In line 13 do you mean x = strlen(word)? (#include <cstring>) Is it ... (by condor)
Map/vector of classes and objects??
 
I have a bunch of if-else statements for every dungeon function. How can i create a map using a struct as a key and my class as a value? or maybe even a vector?...
[12 replies] Last: Yes! it worked like a charm! Thank you sooooo much!! (by damian519)
How to initialize a variable...
 
Hi there, I've recently started coding and decided to have a look at Project Euler problem number one (Find the sum of the numbers below 1000 that divide by eit...
[5 replies] Last: you have a global variable which is accessible from the whole program.... (by rpncse)
Need help
 
Need help? Because the loop not function. The Year supposed increase from 2013 till 2017, but its not done. #include <stdio.h> #include <conio.h> #include <mat...
[11 replies] Last: I do many times try to created the right logic of algorithms, but an i... (by hafidz282)
Dice problem.
 
write a function called integer that initializes all position of a two dimensional 10 by 10 array to random number from 1-100. write a function called sum that ...
[1 reply] : Ok so go and write them functions? I see no problem or question here j... (by closed account 3qX21hU5)
Program Flow
 
I can not seem to get this program to work. The logic may be my problem and the ranges between 0-672 will not work when the user enters a -number. #include<i...
[1 reply] : I don't know what you are doing, but that's what you are declaring ... (by seven50)
Erasing a Space in a String
 
I am trying to erase a space in a string. First Name is a private member variable so that is why I used an accessor function. Is something wrong with the foll...
[4 replies] Last: Ohh ok I see what you are saying now didn't really understand the OP a... (by closed account 3qX21hU5)
Pointers and array passing...
 
...
[9 replies] Last: You defined data as a pointer to an array of three elements. double... (by vlad from moscow)
Virtual inheritance not behaving like I expected
 
Hi, I'm writing some code to test how virtual inheritance behaves, my problem is that the virtual inheritance behaves like a "normal" public inheritance non ...
[4 replies] Last: thanks, I'm experimenting with and I think that now I get how this and... (by seven50)
help! static library
 
I am a beginner in c++. I want to use some libraries. I know I need create a static library . However I do not know how to create a static library and link it ....
[no replies]
June 2013 Pages: 1... 2829303132... 49
  Archived months: [may2013] [jul2013]

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