
please wait
Area of a Triangle |
Hi guys, I'm quite new to C++, just taking my first course now in University. I have this assignment where I have to write a program where the user inputs th... |
Feb 6, 2017 at 10:38pm
[4 replies] Last: I only tried one triangle, but it gave the same area as computed by ot... (by lastchance)
|
by melinda345
helppppp with string
|
i wrote a following program to convert alphabets in string with length 100 this way lowercase alphabets should convert to uppercase alphabets and reverse ... |
Feb 6, 2017 at 9:13pm
[4 replies] Last: You can use isupper(), islower(), toupper() and tolower() to do this: ... (by dhayden)
|
by Mrjoe10
Taylor Series Expansion: cos(x) range issue
|
I have been able to compile with g++ and run this code for a range of degree values -95<x<95, but any degree value outside of this range enters an infinite nan ... |
Feb 6, 2017 at 8:51pm
[4 replies] Last: Ah yes, this makes the error more obvious. I will give it another shot... (by Mrjoe10)
|
by gunam12
how do calculating the avg?
|
How do i calculate the avg i got and divide by the number of students that read from a file? without asking the user how many students? also lining data same co... |
Feb 6, 2017 at 7:54pm
[5 replies] Last: hey I wanted to send you a message but it didnt allow me. The questio... (by sesslit805)
|
by kubanm3
Hex editor
|
Hi. I've got a project to do but can't get through with some things. My program so far takes a binary number converts it to dec and then from dec to hex a... |
Feb 6, 2017 at 7:30pm
[17 replies] Last: It works as it should now. argv file name argv -d destionation argv... (by kubanm3)
|
by thekuma
Area of a Shape
|
So I wrote my code out and when i compile it, it says that calcArea is not declared. Can somebody help explain the problem? /********************************... |
Feb 6, 2017 at 6:55pm
[2 replies] Last: Line 5: calcArea() is undefined. Because calcArea() follows main, you... (by AbstractionAnon)
|
by takaflaka
Palindromes
|
My program is supposed to print all numbers smaller than user-inputted number 'n' which are palindromes. It compiles, but when I input a number into n, it doesn... |
Feb 6, 2017 at 5:39pm
[2 replies] Last: Line 5: m is an uninitialized (garbage) variable. Line 11: You're o... (by AbstractionAnon)
|
by Kourosh23
vector as a pointer using struct C++
|
Personal contribution. Can a vector act as a pointer ? The answer is yes, look at the first and last code (int the reply section). #include <i... |
Feb 6, 2017 at 4:45pm
[11 replies] Last: Oh yes, I mean using a pointer that exists in a struct, and then point... (by Kourosh23)
|
by Fantasy
Passing an object with long lifetime
|
Is there a way to make sure that you can't do this Add(Vector2(100, 100)); but instead only be able to do this Add(pos); Vector2 pos(10... |
Feb 6, 2017 at 3:46pm
[6 replies] Last: Thank you so much. That was great ! Appreciate the help. (by Fantasy)
|
by pumzye
Dynamic Array and For Loop not working
|
Hello Guys My dynamic array is not picking up the number of students entered and working out maximum student score. Please advise how to fix it. #in... |
Feb 6, 2017 at 3:34pm
[7 replies] Last: Thanks for the help, rather new to this (by seasickmama)
|
by Fyuran
Custom iterator issue
|
Hello, I'm currently reading up Bjarne Stroustrup, Programming principles and practice using C++ on chapter 20.7. Visual Studio 2015 won't allow me to compil... |
Feb 6, 2017 at 3:15pm
[3 replies] Last: If you have reached chapter 20 of Stroustrup's book, having worked thr... (by JLBorges)
|
by shw92
Alignment Problem Output Columns
|
I'm having trouble aligning the second column (prices) on my code. cout << fixed << setprecision(2); cout << "Currency exchange:" << "\n\n"; cout << currenc... |
Feb 6, 2017 at 1:17pm
[no replies]
|
by Yoooooo
undefined reference to 'timeGetTime@0'
|
I'm in trouble at finding the proper library for timeGetTime() function. When i try to run it, it give me this error: "undefined reference to 'timeGetTime@0'". ... |
Feb 6, 2017 at 11:56am
[11 replies] Last: Ok, thank you! (by Yoooooo)
|
by Kourosh23
for loops vs for each loop vectors C++
|
Personal contribution. Using for each loop is a common task when you do not want to create an index i for example inside a for loop. For each loops work as lon... |
Feb 6, 2017 at 11:46am
[5 replies] Last: http://en.cppreference.com/w/cpp/language/range-for http://en.cpprefe... (by TheIdeasMan)
|
by gameguy8888
How do I show decimals when dividing?
|
#include <iostream> using namespace std; int main() { int a, b, operation; float answer; cout << "================== Calculator ==================" ... |
Feb 6, 2017 at 11:30am
[7 replies] Last: Although if a and b were double to start with .... then life would b... (by gunnerfunner)
|
by Kourosh23
Prime Numbers C++
|
The following program checks for prime numbers except 4. 4 is not a prime number, but it says it is prime. Any idea how to fix this bug? #include <iostream... |
Feb 6, 2017 at 10:06am
[15 replies] Last: Actually none of last 3 programs are correct. If you run them it shoul... (by TheIdeasMan)
|
by persades
Using round()
|
So i have a program that calculates an equation and my result is for example a decimal number like 15.8569 but its stored into a variable like total, how do i u... |
Feb 6, 2017 at 8:51am
[4 replies] Last: is there anyway of doing it without iomanip, or setprecision() ive f... (by integralfx)
|
Compare Two Strings with Array (I think) |
kh;lkjl |
Feb 6, 2017 at 8:35am
[7 replies] Last: I'd recommend you break down your code into functions to make it easie... (by integralfx)
|
by deleon123
Login program with warning :(
|
Guys Im trying to make a login program wherein there will be a warning in each attempt and I only have to do 3 attempts. In this program I made no matter what c... |
Feb 6, 2017 at 7:04am
[6 replies] Last: Oh sir integralfix thank you for your help I am now able to run the pr... (by deleon123)
|
Compare two strings |
I am trying to write a code that you input one persons DNA then another Person's DNA and it scores it based on matches. For example if two T's (or A's) match t... |
Feb 6, 2017 at 6:04am
[7 replies] Last: What type of loop would I use to do that? a for loop? Whichever loo... (by integralfx)
|