Beginners - December 2014 (Page 26)

by Bwitty
Removing elements from vectors the long way
 
I want to know how to remove an element from a vector without changing the sequence of the other elements in the process. This code keeps giving me the messa...
[4 replies] Last: This works. #include <iostream> #include <vector> #include <algorit... (by elite zero)
by Danny7
what is this (1,2)
 
Create an array of integers in the main program then call a function that prints out the array (you need to pass the array to the function) anyone ever do t...
[22 replies] Last: thats my final resolution? so i could just submit that answer? and t... (by giblit)
by Danny7
array numbers to 9
 
Write a C++ program that outputs an array that counts to 9 1 2 3 4 5 6 7 8 9 #include <iostream> using namespace std; int main(void) { int arr = ...
[6 replies] Last: #include <iostream> using namespace std; int main(void){ int arr =... (by Danny7)
help with homework
 
hello, this homework is due and im already late.. for some reason my code is is compiling with some errors but it does execute. However, its not displaying the...
[7 replies] Last: I have not worked that much with files, but i doubt you can read varia... (by Jacobhaha)
by Jon15
Quick Class question
 
When I try to put in the access code, it doesn't work. The program seems to just refresh the page. I'm sure it is something simple, just hard to find. #...
[no replies]
How to make better use of CPU potential while running a C++ console application?
 
My console application solved an optimization problem. During the optimization process, however, the CPU load is roughly 10% and RAM usage is 8 GB (out of 36). ...
[7 replies] Last: What I'm saying is that the purpose of the program is to reduce the am... (by Duthomhas)
by Torm04
Coin toss assignment [Function Help]
 
Hello, I was assigned this program that flips a coin a number of times and displays how many times heads was flipped and how many times tails was flipped. I fi...
[7 replies] Last: why do you have to use two functions? you could just replace line 16 w... (by jasonwynn10)
by Scizor
How to keep code from getting messy?
 
Hi guys! So I'm working on a program to help me close the register, divvy up credit card tips, compare till numbers, exc... its pretty messy. There are just so ...
[no replies]
by cardjr
C++ Homework, totally clueless
 
Hi guys, doing some C++ homework atm. I was told to "Implement and test the following class." but I have no idea what that entails in the context of this progra...
[1 reply] : friend means that the class can access the friend class private member... (by Callum5042)
Won't output to file
 
I am trying to take a string from dna file and output the rna sequence of it on the dna2 file. For example if the 1st file had: AGTGTGCGTC GTCGATCGCT output ...
[6 replies] Last: Thank you so much you were such a great help! :D and I never knew eof ... (by Dlazyguy)
by ebucna
how to use stof
 
I'm trying to convert string to float but it will not compile. I found the stof thing on the internet but clearly I'm not using it wright. Please help. #i...
[12 replies] Last: Thanks Yanson, it works perfectly:) (by ebucna)
Type of method
 
Write your question here. What type of method is generally responsible for initializing an instance variable?
[2 replies] Last: Thank you! (by brandontuley43)
by KickAz
Calculate the sum of the numbers in each row in a matrix
 
Calculate the sum of the numbers in each row and print it. This is my code, however it doesn't do what it's supposed to do, can someone help me and tell me w...
[2 replies] Last: Hey, MiiNiPaa thanks for the help. I did fix that but also had some ot... (by KickAz)
Assistance
 
Hi, I'm struggling with a certain program and I need someone to help me with it. I'm not requesting someone to do it for me, but to guide me in the right direct...
[2 replies] Last: Thanks, I made some changes and this is what i have now so far #in... (by Newie0001)
Someone Please Help Me!
 
What's wrong with my code? I'm not allowed to use the && operator on this! if (firstNumber > secondNumber) if (firstNumber > thirdNumber) t...
[4 replies] Last: Your logic is genius. Really appreciate the help! (by JohnDeBord)
Totally Stumped On This Total Noob Problem
 
Alright so I need to find the largest of three numbers using a single condition test in each if statement. I can have nested if statements, but I'm not allowe...
[3 replies] Last: Thanks so much for the response. (by JohnDeBord)
by Thor66
if else statements
 
I'm editing a member function for a class. and I cant seem to figure out why there is an error in my statements. The "==" as in (ID == 00) is being underlined a...
[6 replies] Last: BLUEBOX::BLUEBOX(){ user = "bookie"; ID = "tookie"; screen(); } is t... (by PCrumley48)
Finding sum, min, max values.
 
What am I doing wrong? #include <iostream> using namespace std; int main() { int n, value, sum=0; cout << "Please enter positive numbe...
[7 replies] Last: The max and min are independent properties. In your code they have ... (by keskiverto)
Problem with random numbers repeating
 
Program who guesses your number(and counts guesses) but I want the program not to repeat random numbers when he is asking you . #include <iostream> #incl...
[1 reply] : Hi leryss, If you don't want repetition you have to store your previo... (by nonsence90)
Printing out values of array in another function
 
What am I doing wrong? #include <iostream> using namespace std; int storeValues(); void print(); int main() { print(); } int s...
[2 replies] Last: How would I return an array, then use it in the void print() function?... (by sarangheh510)
December 2014 Pages: 1... 2425262728... 55
  Archived months: [nov2014] [jan2015]

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