
please wait
by DeKonTiki
Rotating a point in 2D shows inaccurate result
|
I'm trying to create a member function called 'rotated' in class 'Point'. However when I try to rotate (1,0) by 180 degrees , I get the output as 0.00555556,-4.... |
Feb 27, 2017 at 7:35pm
[4 replies] Last: Changing it to (angle*M_PI/180) worked and gave (-1, 1.22465e-16). Tha... (by DeKonTiki)
|
by likeToRead
Read data from file to 2D array
|
Hello everyone, I am having trouble with an assignment where I have to read in letter grades from a file and then display them on screen. My thought process was... |
Feb 27, 2017 at 7:16pm
[5 replies] Last: Thank you both for your help :) (by likeToRead)
|
if / else if / if else |
So today someone told me there is no function called else if, is that true? I know if exists Else exists But else if does it exist? |
Feb 27, 2017 at 7:04pm
[5 replies] Last: depends on how technical you are. if () { } else { if() //not... (by jonnin)
|
by Thanh Trung
Simple beginner program!
|
I'm doing this program on Mindtap and the website keeps giving me a score 50%. The question is: "Paula and Danny want to plant evergreen trees along the back ... |
Feb 27, 2017 at 6:47pm
[3 replies] Last: Paula and Danny want to plant evergreen trees along the back side o... (by MikeyBoy)
|
by a087m832
user defined functions, what am I missing?
|
Hello. I began learning C++ several month ago and am currently enrolled in a class for beginners at my university. I code almost every day and have the basic ... |
Feb 27, 2017 at 4:34pm
[5 replies] Last: All good. Not using std comes a bit later. For your program you would ... (by closed account 48T7M4Gy)
|
by adam2016
composition why is this not legal?
|
Hi I'm just wondering why I get an error with this code the error is line 8 :no matching function for call to birthday::birthday()' birthday.h #ifn... |
Feb 27, 2017 at 3:38pm
[4 replies] Last: thanks guys (by adam2016)
|
multiplication & division not working |
So I wrote this code and I found that the multiplication and division are not working. The only thing that works are the addition and subtraction. #include ... |
Feb 27, 2017 at 2:28pm
[4 replies] Last: @OP You can replace the cascade of if statements with a switch contro... (by closed account 48T7M4Gy)
|
by HenrikAET
Colors are not working
|
Why does it print only black when I run it? #include <curses.h> char *map = { " #### ", ... |
Feb 27, 2017 at 12:57pm
[2 replies] Last: #include <curses.h> char *map = { " ... (by Mantorr22)
|
Converting english to morse code (1,2) |
Hello I have three questions: the first one is when I run my code and enter text for it when it returns its one letter short and as a result it doesn't give the... |
Feb 27, 2017 at 12:26pm
[29 replies] Last: why do we need to use arrays knowing that they are problematic at lea... (by dhayden)
|
by AlanG
unexpected printout for int
|
Here is my bash session: agauld@ubuntu:~/src/cc/tour$ cat testinc.cc #include <iostream> #include <stdio.h> using namespace std; int main(){ int n = 0; ... |
Feb 27, 2017 at 10:43am
[5 replies] Last: From the horse's mouth: undefined behavior behavior for which this ... (by JLBorges)
|
by kattykat243
Why is my switch infinite?
|
Write your question here. #include <iostream> #include <iomanip> using namespace std; int main() { // Declared Variables const double P... |
Feb 27, 2017 at 6:03am
[2 replies] Last: @whitenite1 Omg, so silly. Thank you it works now! (by kattykat243)
|
by teopeishen
error in my code
|
i have done the code. But when running it, it cannot do more than 3 instruction. Please help. Thnx in advance. #include <stdio.h> int main() { in... |
Feb 27, 2017 at 5:42am
[3 replies] Last: i think i found the problem. i put .2f in the scanf("%.2f",hourrate). ... (by teopeishen)
|
by rshrecky
Question on If / Else if statements
|
The basic idea for the code below is to generate certain responses based on many different constraints and differing user inputs. The code is only allowed to ... |
Feb 27, 2017 at 4:58am
[5 replies] Last: Thanks for all the info guys. Much appreciated! (by rshrecky)
|
by newyork23
error message
|
I get an error saying lost in scope dist0 and dist1. I'm lost on where to fix this code. My guess is the functional declaration. Any thoughts? #incl... |
Feb 27, 2017 at 3:57am
[2 replies] Last: Since the intent is to set values to the arguments passed by reference... (by JLBorges)
|
by hatecpp
Body Mass Index Program with void function
|
I'm studying functions, functions prototypes, declarations. First I tried to create a function with a string return. Then I figured out it is complicated. Here ... |
Feb 27, 2017 at 2:48am
[6 replies] Last: #include <string> #include <iostream> void BMI(); int main () { ... (by closed account 48T7M4Gy)
|
by WestAU
Time between allow else error...
|
Sorry to ask what i thought would be an easy to find answer LOL. I am trying to do the following... if current time is between 07:00-09:00 allow the follo... |
Feb 27, 2017 at 2:43am
[3 replies] Last: Thanks i will give this ago, basically i want to simply allow connecti... (by WestAU)
|
by xx123
headers, classes & main
|
I am new to headers and the main cpp file. So i have to create a program that calculates an employee's salary using her sales and I have to average every single... |
Feb 27, 2017 at 2:20am
[9 replies] Last: I made some changes: class Employee { public: Employee() {} Em... (by TheIdeasMan)
|
by newyork23
simple question
|
I get an error above time, dist0 and dist1 saying expected a deceleration. I don't know why it does this, is it because I'm using const double? /* Progr... |
Feb 27, 2017 at 2:03am
[1 reply] : remove the semi-colon from end of line 39, compile your code and go th... (by gunnerfunner)
|
by AndreasTm13
Eliminating 0
|
I've got a string of n numbers,introduced from the keyboard.For every number in the string that contains 0 I am asked to display it without 0.Example: 15 543 3... |
Feb 27, 2017 at 1:13am
[2 replies] Last: Version without functions: #include <iostream> int main() { std... (by JLBorges)
|
by tit0n
Infix to prefix that is already fully parenthesized
|
I've found a lot of pseudo code or codes in general where they do infix to prefix. But for my project the input can already be fully parenthesized. I am having ... |
Feb 27, 2017 at 1:05am
[no replies]
|