Beginners - February 2018 (Page 7)

Bubble sort not working?
 
Hey! I'm having a problem with my bubble sort loop which is supposed to take an array with 8 members and sort it using bubble sort. It has to output the current...
[3 replies] Last: What you did worked great! There is a problem with the output in the f... (by Toasthat)
Help, Functions!
 
Having some trouble understanding functions. So here it doesn't even run. I think I have the functions mostly right (i just have to get syntax right for middle)...
[2 replies] Last: return ends a function and subsequent code does NOT execute. in main... (by jonnin)
point class
 
For this lab we are going to start off with a fairly simple class. This class is going to contain a point on a plane and this class is going to contain a X coor...
[no replies]
Removing in Circular buffers
 
SO I have this remove function that is supposed to delete an element within the active data of the circular buffer and shift to left the elements. so if my arra...
[no replies]
by chuvak
Function templates and rule of five
 
I have the following code: class ruleOfFive { char* aString; public: ruleofFive(const char* arg) : aString(new char[std:strlen(arg) + 1]) { st...
[3 replies] Last: The rule of five has nothing specifically to do with templates. It's a... (by Peter87)
Please review my code and tweak it. Thanks a bunch <3
 
My code is supposed to be for an Arilines that allows the customer to purchase flights, calculate ho w much the customer owes, taking payment, and calculating c...
[1 reply] : it is producing errors What kind of error - compile errors, crashes... (by Thomas1965)
by McHaul
3D maze - Code review
 
Hi all. So it's been a while since I did anything in c++, so I though making a 3d maze would be a good learning exercise. Hopefully it's fine, but I'm wonderi...
[no replies]
Operator Precedence help in if statements
 
Have a question that is bugging me a bit in regards to Precedence order. After reading the book, it says that the operator "&&" reads before "||". I understand ...
[2 replies] Last: Thank you very much. (by Bayan Khorshidi Berkeley)
the question about char pointer
 
why i need to put & before ch in printf string? and i don"t need to put & before ch in printf char? #include<stdio.h> int main(){ char *ch; scanf("%s",&c...
[2 replies] Last: thx bro (by toby1a05)
Accessing class members outside of the class
 
Hello everyone, I'm just playing around making a "dungeon crawl" from the article posted here: http://www.cplusplus.com/forum/articles/12974/. My only experi...
[2 replies] Last: Awesome explanation, and was exactly what I was looking for. I moved t... (by theoracle09)
changing values of int
 
If i have int x=8, is there a way to change the value of x only if it is in an if statement.
[2 replies] Last: nvm i figured that out. but now i need help turning my if statements i... (by fivestar)
Help with array!
 
I have been able to accomplish this practice problem but I need to be able to enter -1 (meaning last input number) to calculate the average of all numbers, rega...
[4 replies] Last: #include <iostream> int main() { const int MAX_INSPECTIONS = 25;... (by JLBorges)
compiling error in visual studio 2015
 
I got an error which is HeartRates::getAge: non-standard syntax; use '&' create a pointer to member. I think there may be something wrong with my getAge functi...
[2 replies] Last: The code that you posted compiles cleanly. Make sure that the files a... (by JLBorges)
g++ says declaration and definition don't match, but they do! [SOLVED]
 
I want to create a chain of FridgeItem* for my Fridge project. I looked up a tutorial on Linked Lists, and have been trying to duplicate the code for the video...
[3 replies] Last: Adding the const qualifier fixed it. I can't believe I missed that! ... (by msulli1355)
Range Validation and Letter Grade Output issues
 
Hello. I'm new here and with C++ and I'm trying to simulate finding the overall grade of a student in a semester, if that makes sense. I'm using Cygwin to run m...
[5 replies] Last: Thank you so much for your help Misenna! (by ITOYEN2049)
Finding the right IDE and compiler?
 
Hi, I'm brand new to any programming and I'm in windows 10. I'm trying to teach myself C++ and do a "Hello World" program. I'm having problems trying to get ecl...
[6 replies] Last: Visual Studio is also available for MacOS. Both the Windows and Mac v... (by closed account E0p9LyTq)
by obao98
Help with program that read files!
 
Hi. I'm a beginner, and I'm having trouble with my CS 124 C++ class assignment. I'm supposed to write a program that will read a file with 10 grades in it, then...
[11 replies] Last: Ok, got it. I just created a new variable and every time a value was r... (by obao98)
Using while loop for a word search in text
 
Hello, I am needing to write a word search program that will take the user's input and let them know how many times the word or phrase input is found in the ...
[no replies]
Member variable exists, but program refuses to see it.
 
I am working through a DirectX game tutorial on YouTube. I was doing the homework for Tutorial 10, and I declared a member variable in the Game class called yP...
[2 replies] Last: The first point yPos is throwing the error is on 111. I do see the m... (by msulli1355)
Undefined reference [SOLVED]
 
My wife and I have a problem with the contents of our refrigerator. Fridge is full of stuff, and we have very little idea of what's in there/how long it's been...
[4 replies] Last: Why not OBJS = Fridge.o FridgeItem.o main.o all: fridge fridge: $(O... (by keskiverto)
February 2018 Pages: 1... 56789... 28
  Archived months: [jan2018] [mar2018]

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