Beginners - May 2016 (Page 34)

Trying to display a 2D array of 4 rows with 10 columns?
 
My function is supposed to display 4 rows and 10 columns under the words "Lab# Computer". It displays the words Lab and Computer but the rows/columns are no...
[1 reply] : Where do you initialize 'rows' and 'cols'? (by Arslan7041)
Question for final...
 
I have a question before my final and I'm super confused because the correct answer is +1 can y'all explain why?! What is the value of the following expressi...
[1 reply] : true || true == true true || false == true false || false == false... (by ephraimr)
Loops
 
I'm in a beginner C++ class and need some help with an assignment. The program needs to accept an integer and then print out a square with side lengths equal...
[2 replies] Last: I thought I had done that but I gave it another try and it worked. Tha... (by closed account oEwqX9L8)
Functinos C++
 
While calling for function "strategy" on the main function it will execute how it should, but once I ask to return the value it will just return Enter player1'...
[1 reply] : You can't return two variables. You'll need to pass player1_strat and ... (by Arslan7041)
by Briez
Arrays -> Strings with spaces
 
First off I am a beginner and I am teaching myself C++. I am using a hotel as my bases and implementing all learned pieces as I go. The code below functions, ...
[2 replies] Last: Thanks for the enlightenment JLBorges! Simple mistake. In array declar... (by Briez)
***Newbie*** Need help with strings
 
Please help me with the following code. I need to return both first and last name respectively using the string class. The code below only return the last name...
[3 replies] Last: Thank you so much FurryGuy. I really appreciate your help. (by jokeriswild)
File i/o not working correctly?
 
I'm having a lot of issues getting the data from my input file, which is opened in main, to give the right input values. The input for the line to be read is: ...
[2 replies] Last: Thanks, I think that did it! It was part of a loop, so I had to figure... (by hazmatastic)
by spun12
Euclidean GCD of multiple values
 
Hi everyone, I'm currently having trouble developing an algorithm to find the GCD of multiple values using the euclidean algorithm. Currently, my program work...
[1 reply] : gcd(a,b,c) = gcd(a,gcd(b,c)) Use recursion :) (by ephraimr)
Hanoi Tower puzzle with vectors
 
Hello, I am trying to implement a Hanoi Tower puzzle with vectors in C++. I specifically have to use vectors, and I am trying to avoid making this into a class...
[6 replies] Last: @MrArtichoke Very nice, and a lot shorter than what I was coming up w... (by whitenite1)
cannot convert argument 1 to something error
 
done
[no replies]
Really need advice as to why this isnt working
 
This is the file setup that contains fake student information: 918273645,Steve,Albright,ITCS2530,MATH210,ENG140 123456789,Kim,Murphy,ITCS2530,MATH101 213456789...
[no replies]
BinaryFiles and infinite loops
 
So, if I just input spaceless data into the 'edit' string it works fine. As soon as I input a sentence for the change description i get an infinite loop. What's...
[7 replies] Last: Then don't enter any spaces when using the extraction operator since i... (by jlb)
Sorting and Swapping with Pointers
 
These are just the reference instructions for this project(question is after subscript) : Create a program that creates a main function and two functions Sor...
[3 replies] Last: Have continued to try and clean up this problem. still not sure why i... (by Imhotep)
exchange a symbol
 
we want to replace every ',' with '/' from '(' to ' ) ' in a string called A which user enters for( int i=0; i<A.length();i++) { if ( A =='(') fo...
[2 replies] Last: the most simple way to do this is to find the indexes of '(' and ')' i... (by jgg2002)
by teok
String manipulation
 
Hi I got a simple question which Im having an hard time getting to work. Lets say I have a string in a date formate xx/mm/yy and I want to transform it to xx...
[1 reply] : http://stackoverflow.com/questions/5891610/how-to-remove-characters-fr... (by Thomas1965)
by aff
Recursive function with two different data types
 
Hi, I am having problems with generating a simple recursive function bool intTest(int n, char c) that will determine if a digit is (return 1) or isn't (return ...
[2 replies] Last: Solved, thank you!!!! if ((n/10) > 0) return (intTest((n/10),c)); ... (by aff)
Copy constructor and move constructor
 
I'm trying to learn C++ 11. I'm confused about copy constructor and move constructor . Can anyone please tell me all the situations when a copy constructor ...
[4 replies] Last: I'm sorry to say that these are all USELESS! These are written as dif... (by PSYCHAMERON)
by Dizi
Help.. Can't figure out Min & Max
 
Hello, I'm writing a code for a program that has different departures and land for an airport. I am trying to get the greatest and lowest. I wrote a functi...
[2 replies] Last: Hi Moschops, I see where my mistake is at. Really appreciate your he... (by Dizi)
Writing an encrypted file to another file?
 
Write a C++ program that reads text from a file and encrypts the file by adding 4 to the ASCII value of each character. Your program should: 1. Read the pro...
[6 replies] Last: Thanks for your help, I think I finally figured it out. (by djsmith217)
Overloading operator and ostream
 
In my program I'm trying to override == operator and also stream operator <<. I have some errors in these functions. Please help to fix my code. #includ...
[8 replies] Last: OK, it solved half of the problem, but for my predefined car1 object, ... (by ben1355)
May 2016 Pages: 1... 3233343536
  Archived months: [apr2016] [jun2016]

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