Beginners - October 2013 (Page 42)

by nincek
A problem with my code
 
Hello. I'm having a problem with a program I'm trying to create. I just got into C++ recently because of a school project, and I can't continue with the proj...
[4 replies] Last: Thanks a lot man! The code you sent works and pointed me to the right... (by nincek)
Very Simple Program
 
Hello. I am in an intro to computer science class in school, and I have to make a class based program (with separate implementation files) in order to answer th...
[2 replies] Last: In your main program you're getting user input, but you're never calli... (by booradley60)
Anyone have any idea?
 
i'm very new to this... Does anyone have any idea on how to start this program? Any help would be appreciated. Write a program that generates 50 random num...
[2 replies] Last: as Chriscpp said the range of numbers [a , b-1] can be determinated b... (by MohamedDZ)
For loop assistance
 
Hello programmers... I am doing this for- and it is not printing the numbers (no output). Please tell me what is wrong with it. The numbers to print must be gr...
[4 replies] Last: Yes you are correct. Sorry it is in this format rand() % ( Max - min... (by giblit)
How to write a struct that shows a fraction?
 
Here is my prompt: ******************************************************************************** Create a program that uses a struct to model a single frac...
[8 replies] Last: I was able to ask my instructor and completed my program without using... (by Emma Naylor)
by Jaycs
question on arrays
 
This may seem like a strange question. Is it possible to define a multi dimensional array's rows as string and its columns as integers. For instance rows A, B ...
[2 replies] Last: Thank you!! I have played with my code. maybe I should be more specifi... (by Jaycs)
cin vs getline()
 
Our instructor has expressed his preference of getline() over cin in our code, but are there situations where cin would work better. For example, I'm using a ...
[1 reply] : > Our instructor has expressed his preference of getline() over cin in... (by JLBorges)
How to print the letters backwards
 
I need to print this pattern: JIHGFEDCBA IHGFEDCBA HGFEDCBA GFEDCBA FEDCBA EDCBA DCBA CBA BA A The bottom is what I have written so far. What am I doing wrong ...
[1 reply] : Your current inner loop starts with lowest index and then steps ++j to... (by keskiverto)
Help with a simple guessing game.
 
Hello, I am a first year computer science student. I have created a simple guessing game between player and computer. I used a count controlled loop for a best ...
[no replies]
by weave
Passing dynamic array to function
 
I keep getting an error. "Linker error: undefined reference to Readanswerkey(char*, int)" Ultimately I'm going to read answerkey put it in a dynamic variable. F...
[2 replies] Last: I feel silly posting now. Thanks for the second pair of eyes. (by weave)
How to define array which size is do not know yet
 
I have a txt file of double variable. Total record is given different each time. How to define array which i do not know the size until the reading file reco...
[8 replies] Last: Erm, yeah... I was testing you XD I was wondering if someone would sp... (by TheBeardedQuack)
Need help with quadratic equation program (1,2)
 
I know i'm not that close to done, but i am stuck. Where do i go from here? I need to write a program that when the user inputs the coefficients, a b and c, tha...
[39 replies] Last: Basically you want to pass by reference when it is a large class/struc... (by giblit)
Strange function declaration in header file.
 
I'm looking at a header file like below, and it has a class called foo and down at the bottom is a function declaration called boo, and it has the class foo in ...
[1 reply] : You didn't paste all of the code. This is for linking. In C++, the co... (by LB)
Defining Question
 
Em I don't know if anybody had this question but anyway here is it: I was reading about classes and then in the example( the part of it is down there ) I saw t...
[2 replies] Last: In that code snippet, you're defining HumanAge as an argument (or para... (by MikeyBoy)
Writing into multiple files
 
Hi! I have 2 questions about writing into multiple files: 1) Is there a more efficient way than opening and closing files everytime i am trying to write s...
[1 reply] : 1) Is there a more efficient way than opening and closing files every... (by MikeyBoy)
Dice Roll problem using arrays?
 
So I managed to get this simple code to work. Rolling a dice 6000 times and then recording and displaying how many times each number was rolled. Now I'm try...
[2 replies] Last: #include<iostream> #include <cstdlib> #include <ctime> using namespac... (by Chriscpp)
counting odd negative integers
 
for the life of me i cant figure out why my program wont count negative odd integers. Here is the code I am using: int main () { int odd = 0; i...
[3 replies] Last: ok so the whole thing will look like this: int main () { int odd = 0;... (by ryanskyowa)
by Kimber
Random generation
 
I am trying to create two random numbers,have the user add the two numbers together, and then check have it check to verify the answer is correct. The first ...
[1 reply] : do this: int val = rand() % 51 + 10; // % is modulo/remainder Note ... (by coder777)
Inputting a text file and manipulating the data inside it
 
Hey all! I'm new to coding and recently took up a C++ course to help with some computer modelling that I'm doing as part of my PHD. Unfortunately, the other ...
[5 replies] Last: you won't really be needing getline since you are just fetching number... (by nvrmnd)
hw help (final question of semester)
 
Write a complete program  to read student data from the standard input, sort it by last name  / first name , and print out the result to standard output ....
[5 replies] Last: http://www.cplusplus.com/faq/sequences/sequencing/sort-algorithms/ ... (by a k n)
October 2013 Pages: 1... 4041424344... 86
  Archived months: [sep2013] [nov2013]

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