Beginners - July 2015 (Page 3)

Classes and Inheritance Problems
 
I cannot understand why I am getting an error for 'nameInput' and 'weightInput' on Line 15 in Pitcher.cpp. I am simply trying to create a "PITCHER" class derive...
[10 replies] Last: Awesome, thanks again! (by D0CHollywood)
help me please
 
#include <iostream> #include <string> using namespace std; class students { int data_members; public: string first_name; string last_name; double gp...
[2 replies] Last: @OP: The code you've given does nothing to address the problem you've ... (by booradley60)
Serial port help
 
I am having a problem reading from a serial port every-time that I read from the port I get a different value and even (most of the time) more than one output, ...
[11 replies] Last: do you know the exact number of bytes expected replace 20 with that nu... (by rafae11)
My Very Beginner Software Will Not Load in command promt
 
So I Get this error: o- no such file or directory vars.exe no such file or directory what i wrote in command prompt is c++ vars.cpp o- vars.exe here is the co...
[5 replies] Last: Should you have -o instead of o- ? (by booradley60)
by Winsu
I can't understande this code
 
This is a part of a big code that I have got, and there is a part that at the moment I dont know what it's doing stream & operator << (ostream & os,Dig...
[2 replies] Last: yes...I think is this one char Dig2Char(DigBCD a) { switch (a) { ... (by Winsu)
Help with my search function
 
I am trying to have a user enter his/her name. The program should then search the .txt file to see if that name exists. It is then supposed to input the name to...
[5 replies] Last: Just a question can two users have the same username? if not then this... (by Pratik K)
Autocomplete for switch in codeblocks?
 
Hi! I'm making a program relying on switches with many cases. Is there a way to autocomplete a switch? Like I press a button and I automatically get a new li...
[3 replies] Last: Orwell's Dev-C++ fork has the ability to add code snippets, and switch... (by closed account E0p9LyTq)
Multiple Inheritance
 
For my computer science class we are supposed to write a program with classes that calculates how many seconds, minutes, hours, days, months and years from a gi...
[7 replies] Last: Never mind I figured it out! Ah good ! I hope you spotted the p... (by TheIdeasMan)
Run small scripts in CMD?
 
So basically I'm learning from an app on the mobile where they create and learn c++. The thing is, the person makes for example an basic calculator and I just w...
[1 reply] : C++ is not a scripting language. You will have to compile the program ... (by Zhuge)
how to save input in a file?
 
I am writing this little test program to see if I can save input into a file without it being overwritten, however i cannot. here is the following code: i...
[3 replies] Last: So, if you want to save the previous input, either open your ofstream ... (by koothkeeper)
by leourb
Access and Modify Class Elements in a vector<class>
 
Hi. I would like to know if it is possible to access and modify an element of an existing class object. If I have a constructor like this: Book(string ti...
[7 replies] Last: Yes keskiverto! Thanks... I am writing a program part of an exercise o... (by leourb)
Problem counting words individually
 
Can someone please help me. Thank you for looking. It is not counting the each word separately Prompt. Input chars. Consider a period, '.', to be a sentin...
[3 replies] Last: @keskiverto, Great my version (using my suggested algorithm above) wor... (by CodeWriter)
My for loop was okay but my while loop is not. I don't know how can I do it. It should be 10 to 1 not 1 to 10
 
#include <iostream> using namespace std; int main () { int num = 0; cout << "Using for loop\n"; for(num = 10; num >= 1; num--) { ...
[2 replies] Last: Thanks man. :') (by mightyjack)
by JoanT
Having problems with codes
 
I'm supposed to write a program to create an array of size 20 to store integers. Then, the program should generate and insert random numbers between 1 and 7, in...
[9 replies] Last: Here's the modified version. Just refactor and/or arrange it according... (by jrosario)
how do i goo about this
 
The heating system in a school should be switched on if the average temperature is less than 17 degrees celcius. The average temperature is found from the tempe...
[5 replies] Last: Deja vu ... same poster, same topic, the other two threads: http://www... (by keskiverto)
How to solve
 
Write your question here. My computer has some problem, when i open computer, it says unactive windows, how can i solve it.
[1 reply] : Maybe you mean "Activate" Windows :| (by leourb)
Error reading string with spaces
 
In this menu driven program, when I run the code and take "Add employee", I am unable to read names from the user which has spaces. I can read "John". Consol...
[7 replies] Last: @CodeWriter, When I use that code and input something like "Wayne Roon... (by AnishKumar)
by fguy
User defined I/O operators.
 
when I run the code below I get garbage output after reading the data from the text file and printing it out. I believe the problem is with my user defined inpu...
[3 replies] Last: #include <iostream> #include <vector> #include <fstream> struct Poin... (by JLBorges)
Cannot find my error
 
I'm writing a program for a class and cannot figure out my mistake. Can anyone help. the program is below: //C++ Exercises and Solutions //www.cppexercisesa...
[3 replies] Last: Hi, Welcome to cplusplus :+) Just some pointers to help you out for ... (by TheIdeasMan)
by kal24
substract all 1 number
 
Hello,this is what I have so far but I don't get how to do the substract the largest all 1 number you can. here is the question ********************* Write a ...
[3 replies] Last: you may see 111 as 1+10+100, so keep substracting until the number is ... (by ne555)
July 2015 Pages: 12345... 33
  Archived months: [jun2015] [aug2015]

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