Beginners - June 2016 (Page 11)

Smart way to call between classes
 
What is the smart way to call and create classes each other type? I am very new to C++ and I come from a very OO background in Java, and I am having troule rapp...
[2 replies] Last: What would I do to fix this? I kinda understand why it happens but I d... (by avery24681379)
fraction
 
Hello,can me anybody help??? I'm need to make fraction and them addition. For example 2/3 + 3/5. I did the wrong therefore appeal to you
[1 reply] : mimick the steps you would do on a piece of paper with code: 1. Find ... (by PrivateRyan)
Obviously I'm not understanding constructors...
 
Here is my code: class SubTest { public: SubTest(int i); private: int j; }; class Test { public: Test(in...
[2 replies] Last: Or you could have done this: Test::Test(int i) : sub_test(i) { } and... (by Chervil)
String help
 
For my class I was asked to create some code to be able to accept input for 3 types of numbers: one that is divisible by 3, by 5, and by both 3 and 5. That all ...
[8 replies] Last: Strange, ran my code and it prints out the number and message for each... (by Arslan7041)
need code
 
how to write a programm in which we enter positive integer and it will give us the sum of all odd integers upto the entered positive integer..e.g if we enter 12...
[3 replies] Last: Since it helps me playing around with code since I am in a programming... (by DirtyDan)
by manley
streams and files i/o
 
I am trying to write a program that reads a file named test1.txt of 10 integers and outputs the values to a second file called test2.txt... below is what I have...
[8 replies] Last: oh okay thank you! (by manley)
Battleship grid
 
hello, making battleship however i am not sure how to start with the grid. How would i start making the grid? could u give me some links to anything that helps ...
[2 replies] Last: Search this forum for "battleship". You will find lots of examples. (by AbstractionAnon)
Assignment for School. Missing piece??
 
Hi everyone, I'm a noob with C++ right now so any help/suggestions would be most appreciated. The main problem that I'm having with my code right now is that I...
[7 replies] Last: Maybe something like this, just fill up the cases with your stuff? #... (by closed account 48T7M4Gy)
by darje
strcpy? compiler problem..
 
Write your question here. #ifndef STING_H #define STRING_H #include<iostream> #include<cstring> using namespace std; class str{ char *m_str; i...
[4 replies] Last: Since you have a set() method, you could implement the constructor u... (by dhayden)
by chipp
C++ Robotic Forums?
 
i wanna ask, can anyone suggest good C++ robotic forums?
[7 replies] Last: @CG: thx for ur info, bro (by chipp)
Reading variables from file
 
Say I was tracking statistics from a game and I wanted to track damage dealt. Example: "2016-06-12 13:53:56 You inflicted 52.0 points of damage." And...
[5 replies] Last: system("pause") is only needed if you use Visual Studio to keep the c... (by LuckyXII)
Need Help with Arrays
 
I just need help storing the information in rows and columns. Here is the description: "A local zoo wants to keep track of how many pounds of food each of its ...
[2 replies] Last: Delete lines 18 and 19 and the program runs. What is their use/signifi... (by closed account 48T7M4Gy)
For loop doesn't display array, Help
 
Hello my name is Fred. I've tried a couple of times to learn c++ but I just keep giving up, and I don't want to do that again that's why I'm asking for help. I'...
[6 replies] Last: Hi, The usual for loop idiom: for(int a = 0; a < 5; a++) It is co... (by TheIdeasMan)
Programming Rabbit Holes... How Do You Avoid ?
 
Hi all, I had a question that came from a recent experience with my IDE (Visual Studio) and it made me think about an aspect of being a programmer that I ha...
[8 replies] Last: Hi, AbstrationAnon and Duoas....... You know what...... I know deep do... (by ExponentialP)
by Tmanto
Program fills up hard drive after running
 
in the title. I am not writing to a file, and nothing that is readable becomes a large file, but my hard drive fills up extremely quickly after running a progra...
[3 replies] Last: https://help.ubuntu.com/community/Baobab (by helios)
Request: Feedback on program that turns numbers into words
 
I had an exercise in a book I'm working out of that told me to write a program that turns numbers into text from -999,999 to 999,999. I finished it and it wo...
[2 replies] Last: That looks waaaay better than mine. Thanks. Im going to look over it a... (by snowl0l)
by Ch1156
Vector not being cleared
 
I havent done any programming in a long time and i'm a bit rusty, but I'm trying to set up a name generator class, still in the early phase so no name generatin...
[5 replies] Last: Alright I got it working thanks. (by Ch1156)
GCD function - please help explain
 
Greatest common denominator function - can somebody please walk me through how this function works. int gcd(int a, int b) { return b == 0 ? a : gcd(...
[3 replies] Last: Thanks a ton PrivateRyan, that was a great explanation! I understand i... (by ssoffel)
General Project Start
 
Okay bear with me, convert from java and I normally command line code things. I want to start a decent sized project in c++, a game to be exact, and I don't qui...
[2 replies] Last: Thanks so much, this seems like it'll help me start the process! (by EarthBound)
Using loop to increase numbers.
 
Well I'm trying to use loop to increase a set of numbers over time. Example: Day 1 $0.01 Day 2 $0.03 Day 3 $0.09 Day 4 $0.27 Day 5 $0.81 (Ke...
[7 replies] Last: @xBroken115 I don't know why you insist that a given day's savings is... (by xismn)
June 2016 Pages: 1... 910111213... 25
  Archived months: [may2016] [jul2016]

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