Beginners - October 2015 (Page 36)

How do you make letter grades with plus/minus line up
 
so i have my program completed i just cant line up the letter grades at line 145. it looks like this ID Course Letter Grade Grade 1 80.50 ...
[3 replies] Last: The easiest thing to do would be to change your string literals so tha... (by cire)
Random Number Help
 
Ok, I am making a fake virus detector, but whenever it loads the virus it says 23 and 6, no matter how much times i try it. Also even though i added system paus...
[5 replies] Last: That will give you random numbers each time yes. (by TarikNeaj)
by nuboam
String Literal to Class Constructor and Const References
 
Hi, I have a question, let me explain... Instance one: string object created in main, another temporary copy is created in a different section of memory, then ...
[3 replies] Last: a temporary memory location is created containing "Sam" Generally no... (by AbstractionAnon)
by msrt92
Problem in making Global String Array
 
I am having issue while creating string global. #include<iostream> #include<conio.h> #include<string> using namespace std; void match (); void ty...
[5 replies] Last: Hi msrt92, Everyone jumped on the errors. I believe there is some... (by pearlyman)
How to get a void method to edit a variable
 
So my method takes a wallet object which stores the the amount of coins you have (e.g 7 quarters, 6 dimes, 1 nickel, 5 pennies), and adds them to another wallet...
[4 replies] Last: bingo cire! I'm going to see what other things you can do by passing ... (by omega4relay)
Basic question to do with operators.
 
Hi. I'm trying to make a random math question generator. I generate 2 random numbers between 1 and 30 along with a random operator. Here is the code i use to c...
[3 replies] Last: Line 1: You can't have multiple fields on the right hand side of a co... (by AbstractionAnon)
keep track of of vector pair indices upon sorting
 
Similar things have been asked before but I am having trouble applying the concept. I would like to to keep track of the indices of the pairs in my vector of pa...
[1 reply] : > I was thinking of converting to triples, where the last element is t... (by ne555)
by Dazzer
Q about operator overloading and default constructors
 
Could someone please tell me why the code below doesn't compile? I'm specifically interested to know why the call at line 22 to initialize with a default const...
[2 replies] Last: Oops, silly mistake, thanks! (by Dazzer)
Switch statement using objects that are members of other classes. (HELP VERY MUCH APPRECIATED)
 
Below I have a switch statement in a class called undergraduate that attempts to use objects of course class (the object is being used as a data member in the u...
[4 replies] Last: I got my code working guys! Thanks so much for the responses! (by cher1201)
by Arquon
Exercise about time and lightyears
 
Spaceship speed = 200km/h, lightyears to travel = 5. Years it will take to travel = 27000000. I cant figure out how to find how many years itll take to travel, ...
[4 replies] Last: distance == time * velocity <=> distance / velocity == time (by keskiverto)
Homework help?? Loops and Math
 
I have a homework assignment due tomorrow and I have a basic outline of the code for it, but when the code is executed, the math is wrong. I will leave the prom...
[no replies]
by vkosty
Help with simple menu, trying to use if statement.
 
Hello, I am trying to create a simple menu using multiple if statements. I am not getting the results I am looking for. When I run my program, I am trying to en...
[2 replies] Last: thank you sir (by vkosty)
by TPL
Logical Operators Help [TCLite] [C++]
 
Here is my code for a project for school. Simply enter the number of hours worked in a day, and the program tells you your daily wage, including overtime. I ...
[2 replies] Last: Alright, thanks so much. I knew it was going to be a simple stupid thi... (by TPL)
by Arquon
Having trouble with getting int out of .txt
 
Hello, I need to get int out of .txt file, what I did, didnt work. I need to get 3 int out of it: 3 5 30 3 11 4 25 D-3 M-5,3 and 4 S-30,11 and 25. Her...
[5 replies] Last: Thank you pearlyman. Theres one more question, how can I read files ti... (by Arquon)
by ali64x
map a key to different number of values
 
hi guys. I need to create a map such as : map<string, int> mymap; mymap["varchar"]=23,24,25,500,800; mymap["ineger"]=203,1000,541; mymap["boolean"]=1,...
[4 replies] Last: Many thanks JLBorges. (by ali64x)
Objects as members of classes
 
So I am trying to write a class called undergraduate that takes an object of the Phone class as an argument. However, the phone class uses a const data member c...
[4 replies] Last: thanks! (by cher1201)
Dice rolling function - comparing random number to a value does not work
 
Hi everyone! This is my first post here and actually my third tiny program that I am trying to write; I am completely new to C++ and programming in general. ...
[2 replies] Last: Thanks! Yes indeed that was a silly mistake they are all 0.. I just no... (by brownyeyes)
by mukdew
number is existing ?
 
Write your question here. how to make a program that show me if the number exists in the file text or no plz help
[1 reply] : I would recommend you start by creating a main function, then take it... (by TarikNeaj)
use cout inside a function
 
How can I use cout inside a function to print out? #include <iostream> using namespace std; void Print(){ cout << "Print this out "; } int main() { ...
[4 replies] Last: #include <iostream> using namespace std; void MaxorMin(int n, double... (by TarikNeaj)
fill vector pair from cin
 
I can't seem to wrap my head around this. My task is to get input from cin (using push_back) as a vector and then sort the vector based on 'pairs' that are e...
[2 replies] Last: I can't believe it was that easy. Thank you. (by big leigh bowski)
October 2015 Pages: 1... 3435363738... 57
  Archived months: [sep2015] [nov2015]

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