Beginners - April 2015 (Page 24)

by s8050
Is there a way to make simple tones in simple console app?
 
Hi It's my first year in learning C++. I just make simple console applications. and I would love to have the option to insert some simple tones in my applicat...
[3 replies] Last: Your welcome :D even I cried when I found it. Amazing (by shadder)
Rectangle class
 
"Write a class definition named rectangle to represent a rectangle. The class contains 1. Two private double fields named width and height that specify the wid...
[16 replies] Last: It runs, but this is the output I get: Rectangle 1 area ia greater t... (by joeaswe1)
It wont update or react to an updated int x
 
I was doing the challenges on this website and came upon a problem The code is supposed to ask you for a number other than 5 When you give it a number other th...
[2 replies] Last: Thanks LB! You really cleared that up for me, i didn't realize that. ... (by RadioactiveRetard)
Pointer
 
I need to calculate the average grade. Here is my code: I keep receiving 0 when I'm trying to calculate the avg. #include <iostream> #include <string> ...
[8 replies] Last: My pleasure^^ Happy coding! (by TarikNeaj)
Bitset Exercise from C++ Primer
 
Write your question here. #include <iostream> #include <bitset> using std::cin; using std::cout; using std::endl; using std::bitset; int main(){...
[1 reply] : Line 12. What input can be converted into bitset<32>? (by keskiverto)
C++ program works fine locally but gives me errors when I submit it as homework due to -Wfatalerrors
 
Title. The program uses parallel arrays and sorts children and parents into sides. The error I'm getting is: parents.cpp: In function 'int main()': parents.cp...
[6 replies] Last: Have you tried talking to your professor or emailing them to find out ... (by LB)
Return an error and continue program?
 
I have some code that at times, will divide a number by 0, which is undefined. This still gives me an output of 1.$ or something, which I know represents undefi...
[2 replies] Last: I'm not too sure what sort of program you're trying to make, but why n... (by closed account 2LzbRXSz)
by aali
I hope to help me solution
 
Hello I hope to help me solution ------------------------ write a program to read an integer array a , and print out elements Of array regular and pri...
[6 replies] Last: Thank you (by aali)
Rounding a Double with Exp form
 
I have code that it outputting doubles in the form of 1.08288e+006. How do I round the double to only one decimal point eg, 1.1?
[1 reply] : look up std::setprecision & std::fixed (by Texan40)
Confused about Constructor def
 
I'm writing a constructor for a class and I am confused about what to do. Here is the description for what the constructor should be: Only one constructor wi...
[6 replies] Last: Oh okay I see. I feel silly now. Thanks guys. (by DreamTime)
Text based adventure storylines colliding!
 
I want to create a text based adventure where the options can collide into one option. So for example, say renaming a city. It would not have much effect on the...
[11 replies] Last: Why is using namespace std; bad? http://stackoverflow.com/q/1452721/... (by LB)
need a help in ( for , while )
 
hello guys can you help me in writing this program : Write a program that reads number until the number 1001 is entered. After that output the summation o...
[4 replies] Last: Just trial and error and let us know what you come up with. If you're ... (by closed account 2LzbRXSz)
Copy-assignment operator
 
this code HasPtr &HasPtr::operator=(const HasPtr& obj){ ps = new string(*obj.ps); i = obj.i; return *this; } same to this one, right? Ha...
[4 replies] Last: I'm using pointer string because of exercise in book c++ primer. Other... (by jakvrh1)
how does one make their class variables private but still access them?
 
how does one make their class variables private but still access them? for example const int MAX_make_charactrs = 9 ; class Auto { public: c...
[6 replies] Last: so by making friend declarations I can access private variables from ... (by tipaye)
by azoom
Help with a loop
 
Hey guys, i'm doing some work and really need some help. I'll paste the code I wrote thus far. I have this to work without a loop, but I can not get it to work ...
[2 replies] Last: Thanks a lot! I've started to check out the videos as well. :) (by azoom)
fstream problem
 
Hi I have problem my program doesn't want to save console in some output file and when I run it with this fstream code he doesn't stop to work when he should st...
[1 reply] : First off you have quite a bit of memory leaks in this program, which ... (by Z e r e o)
Project Euler #1 Algorithm Question
 
Hello everyone, First time poster here. I recently started learning C++ and have been doing some of the Project Euler problems for practice. I'm currently wo...
[7 replies] Last: OK. I now see what you are doing with strings and vectors. Very compli... (by closed account 48T7M4Gy)
what's wrong with my pushback
 
i keep getting this error message lab38.cpp:27: error: request for member `push_back' in `*(&itr)->__gnu_cxx::__normal_iterator<_Iterator, _Container>::operato...
[3 replies] Last: > the program looks at the one's place of a vector and puts it into bu... (by ne555)
Slide/Selection Bar Help Please
 
Hi, I am new here :), not sure where to start or ask. I am hoping someone may be able to help me or point me in the right direction to create a horizontal se...
[2 replies] Last: Thanks LB (by jcauser)
Unable to use friend
 
Hi! So for our assignment we can't use 'friend' (friend bool operator > ) but I have to compare two user-inputted values (so I still have to use the bool ope...
[4 replies] Last: There's no relation between 'using two variables' and 'friend'. With ... (by coder777)
April 2015 Pages: 1... 2223242526... 52
  Archived months: [mar2015] [may2015]

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