Beginners - April 2018 (Page 6)

by Church
Accessing a class object outside the function it (the object) was declared in?
 
I'm still pretty new to C++, sorry if this question is stupid... although I've run into a lot of roadblocks this is the first time I can't find the answer throu...
[2 replies] Last: Although in C++ you can make it a class method instead of a stand-al... (by mbozzi)
Help with counting
 
I need help with counting clumps of numbers For example, I have a multiset<int> = { 1, 1, 2, 1, 1 }; This would print out 2 since there is a 1 that is consecu...
[5 replies] Last: oh, I see thank you. I looked at the wrong testing cases where it used... (by kikiyox77)
.txt file not saving inputs
 
I am trying to write up a code that ask a user for how many numbers will be inputted. Then take that many numbers and save them to a .txt file and repeat, savin...
[2 replies] Last: Oh ok that makes sense. Thank You (by Dylan 256)
Help coding UNO
 
So I have an assignment that requires me to code UNO from the ground up, although not all rules need to be implemented just yet. I understand that I need count...
[11 replies] Last: @Ganado At that point, it would be easier to write a meta-program (us... (by megatron 0)
Help with hw
 
Hello smart people! So this is my first c++ class a=in college and i like c++ the most out of all the languages but professor put up extra credit which is real...
[3 replies] Last: I agree with above. Vectors would be a lot more suitable for this situ... (by nicholascleveland)
Circular doubly linked list from a text file
 
Hello everyone, I am having a hard time figuring out how to form a circular doubly linked list from a text file. I know I have to store the data from the text f...
[5 replies] Last: [quote=itfreakas]It still does not work. That's probably the vaguest ... (by icy1)
Problem with Loop
 
Hello, I need my code to be able to give money back to user when having paid more than the cost of the drink. Else, if they pay in full it's supposed to not ...
[1 reply] : Consider: debt = ... WHILE ( 0 < debt ) ask for money to cover 'deb... (by keskiverto)
making an input file into a list
 
I have to sort an input file using lists. How do i make an input file into a list. Do i have to store it in a vector first? The input file has 100 words in ran...
[2 replies] Last: thanks thomas, Ya the whole list part was from an example from my teac... (by paul314)
by lauri
identifier not found c++
 
i get this is a simple problem, and i have spent almost 2 hours now looking for a fix but everything i try just creates more errors somehow. i only started lear...
[2 replies] Last: okay it works now, thanks! (by lauri)
Problem with std::map and txt file reading
 
Hello there! I have a problem with my code, I mean... I used std::map container to sort letters in alphabetical order and assign them number of their positi...
[3 replies] Last: Not sure what newlines you're talking about. p042_words.txt does not c... (by Peter87)
by Haley
SOSOS I can not find out what is wrong with my program!!!!!!
 
I can not for the life of me figure out what is wrong with this program. This is meant to be an endless runner game modeled after the google T-Rex game. ...
[1 reply] : Line 225 if (ch == ' ') is wrong. ch should be an int and you can... (by Thomas1965)
random string
 
somebody can help me to make program like this ? Input : HAI BKA ADA Output : AHI, AIH, HAI, HIA, IAH, IHA ABK, AKB, BAK, BKA, KAB, KBA AAD, ADA, AAD, ADA, D...
[2 replies] Last: 1. You want to read each word separately. http://www.cplusplus.com/doc... (by keskiverto)
Need help and suggestions for a program.
 
I'm programming a program that requires user to input choice of 3 codes (A,B,C)that defines cost of a room in a hotel an unspecified number of users are using a...
[1 reply] : So, what function should I be using for the program? It depends what... (by Thomas1965)
Sorting three vectors simultaneously
 
I was trying to sort three vectors of equal size, Student_ID, Name, Age. Now the information is randomly stored but the corresponding elements have the same ind...
[2 replies] Last: Thanks, it works. (by ajibpaudel)
Switch Case
 
Hello everyone, i can't seem to get this to run, it says total was not declared in this scope when i want to run it. it points out the error in my display state...
[2 replies] Last: Hello ashleydee1999, PLEASE ALWAYS USE CODE TAGS (the <> formatting b... (by Handy Andy)
Vectors, Structs, classes, and strings not properly assigned?
 
Write your question here. I'm not sure where the exact issue is. The part of the program I'm on is a class that will manage a list of Employees. The employees ...
[2 replies] Last: Thank you! That was the issue. I knew it had to be something dumb. Tha... (by SloanTheSloth)
Parallel Arrays
 
I'm stuck on a project I'm supposed to do for class having to do with parallel arrays. What I'm supposed to do: • Write a program that tracks the number o...
[8 replies] Last: Yeah I got rid of the do while loop. I thought I needed it. Also, I'm ... (by mudkipsss)
Trouble reading from text file
 
Hello everyone, hope your day is going well. mines not so well, I can't figure out why this isn't working. I'm learning how to write and read from a file, Th...
[5 replies] Last: You can use seekg. I opened the file with truncate below so it starts ... (by tpb)
C++ assignment
 
Can anyone please help me with this.Please Create a database system using linked-list for any one the following: -Student Record System (Name, Matric num...
[4 replies] Last: To start off, if you have to create a linked list from scratch yoursel... (by nicholascleveland)
Need Help with matrices
 
Hello im an engineering student who is a beginner at c++. for homework we were assigned a basic matrices worksheet. my question is how do i save the letters as ...
[2 replies] Last: I think this works: #include <iostream> //#include "T:\StewartM\ENR ... (by rjphares)
April 2018 Pages: 1... 45678... 25
  Archived months: [mar2018] [may2018]

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