Beginners - October 2016 (Page 14)

I need help for a value by reference program
 
I need help for a value by reference program with the area of a rectange Why doesn't my code work??? #include <iostream> #include <iomanip> using namespa...
[4 replies] Last: Line 56: You can't return 3 values. See the comma operator here. The... (by SakurasouBusters)
BET HELP!!
 
I had a bet with my friend, this is my second question posting on C++ ever. My first experience wasn't so good as i lost my bet but hopefully this time i will w...
[4 replies] Last: Don't spam the forum with multiple threads on the same topic. it wast... (by MikeyBoy)
lines to txt file
 
I have two issues, so far, I am able to open an existing txt file, and write a line of code at the end of it. What I am trying to do is, ask the user how many o...
[4 replies] Last: > if I wanted to say, add a line of text in between a certain line, wo... (by JLBorges)
Loops - Drawing a Tree (c++)
 
Hi! I'm having trouble with this problem. I was wondering what would be the best way to do this? #include <iostream> using namespace std; int main()...
[7 replies] Last: alright, thank you so much! (by student2019)
random
 
help me to solve this Fill out an array of as many as N random numbers from 0 - M N and M entered, N <M do checks after input to ensure valid input The nu...
[7 replies] Last: The language of the identifiers is not a real issue. We see a lot of m... (by keskiverto)
by om4r97
logical error with Fstream
 
i have to initializes data from file and use array of struct to output the final result my text File Sam Albert 18 20162176110 86.7 Math101 CS101 Bio101 Sar...
[4 replies] Last: i.open("lol.txt"); Should be : string fileName("lol.txt"); i.open(... (by SakurasouBusters)
Validating a C - String (Numeric or Alphabetic)
 
Write a program that asks the user to enter a part number to order. The rules for creating a part number are as follows: a) The first character must be an "A",...
[12 replies] Last: Okay I'll look into the problem. Thank you for your help once again la... (by Helexander)
Is there anyway to quit using String name
 
Is there anyway using string name to quit program. by using number in string to quit program. for example : #include <iostream> #include <string> #include <i...
[6 replies] Last: Thanks @Handy Andy.. its works :) (by DesmondLee)
Text based "dating" game using OOB advice, Passing objects to contructors
 
So I'm making a text based game using Classes, inheritance , derived classes and the such for a class project. Was hoping someone could take a peek at my code s...
[2 replies] Last: Thank you much! More than anything I was hoping to get guidance on how... (by archidit)
How to store a random number in array
 
Hi everyone. I'm still new to programming and now I have some issue on the array So now, I had copied some example code for random+ing number in a certain range...
[2 replies] Last: Thanks for your info. (by ivesklt96)
Name a out file using strings
 
So I want to create a file to output some information into and want to include to user inputted strings in the name. ofstream gamefile string team1; string t...
[4 replies] Last: std::ofstream gamefile(team1 + '@' + team2 + ".txt", std::ios::app); ... (by cire)
Function that takes a string and character and returns number of occurrences of character in the string
 
Function that takes a string and character and returns number of occurrences of the character in the string. int countChars(const string& s,char c){ in...
[5 replies] Last: We can see that code in the OP. The question is "What are you doing... (by cire)
Help with figuring out what's wrong with my game? (Mastermind)
 
I'm coding up a game called mastermind. It's in a really simple state. Basically there are four spots. Each spot has a letter assigned to them, and the player g...
[2 replies] Last: The line 39 : (guess ==spot ) ? (chkSpot ='O') : (chkSpot ='X'); S... (by SakurasouBusters)
Difference between creating an object with or without new operators
 
Hello, I am asking a question here for the first time. So, I hope would like to help me. I just want to know the all differences between creating an object wit...
[2 replies] Last: Very much thanks to mbozzi. I am highly thankful to you for this detai... (by kamal choudhary)
Inheritance
 
I don't understand how inheritance works entirely. I'm trying to make a program that counts the number of comparisons that a sort makes using a virtual class bu...
[1 reply] : I think I figured it out but I would like some conformation from someo... (by rorschach775)
2D Arrays
 
This program is supposed to output the row and column of the number entered by the user but it is not working that way and honestly i am confused on how to do i...
[no replies]
Outputting Card Notations
 
Hi there noob here who for an assignment is trying to make a program where you input a card notation and the full name of the card comes out. For example, "4H...
[3 replies] Last: You can use a for loop and a string array and they will help you compl... (by SakurasouBusters)
by w0rd
Help with functions/files (1,2)
 
So I have done the code without the function, which is where I am completely stuck. If you could please help me that would be awesome! So the program searches...
[21 replies] Last: Hey Andy, Thank you so much for taking time out of your day to explai... (by w0rd)
Invalid conversion from ‘int’ to ‘int*’ [-fpermissive]
 
So I'm writing a program that takes a user input size of an array as well as the arrays numbers returns them with the sum and average of the numbers but I keep ...
[2 replies] Last: 1. for (int i; i , size; i++) Should be : for ( int i = 0 ; i < ... (by SakurasouBusters)
Expression Error
 
so I'm getting an error message that says expression must be an integral value or unscoped enum type, and also that ^ is an illegal operator, I'm still a bit ne...
[1 reply] : 1.) Lines 5 - 10 will execute indefinitely, because they are inside of... (by xismn)
October 2016 Pages: 1... 1213141516... 51
  Archived months: [sep2016] [nov2016]

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