
please wait
by Murasame
Array/Loop assistance?
|
1. Declares an array of 5 integers and initializes each position to 0 2. Use a loop to prompt the user to enter the data into each position of the array. 3. U... |
Mar 30, 2020 at 10:01am
[4 replies] Last: Hello Murasame, That will work to a point as long as the user always ... (by Handy Andy)
|
by hmzi123
Operators
|
So i have to write an !operator that changes the symbol ( if its + it shows -, and if its - it shows +) of a complex number of my choice, and i dont really unde... |
Mar 30, 2020 at 8:38am
[6 replies] Last: Why do you need void? The complex conjugate is a complex number; that'... (by lastchance)
|
by urbanmystic
ICAO Program with function.. help?
|
The instructions for my assignment are pretty simple design a program that takes user input in the form of a string and transform it into corresponding phrases ... |
Mar 30, 2020 at 3:49am
[2 replies] Last: I was able to fix it by moving the output prompt around a bit. Thank y... (by urbanmystic)
|
by valiciousx
reverse an array(convert from void to int error)
|
I need to write a program which reverse an array using a stack.I have one error which says that can not convert from void to int and I don't know how to approac... |
Mar 29, 2020 at 10:47pm
[4 replies] Last: Yes, it's working now.Thank you for your help! (by valiciousx)
|
by yuemingcpp
Deep copy of pointers
|
Hi, A class called Pair and its member variables int* pa and int* pb have already been created. I am trying to do a deep copy of pointer pa and pb. Please se... |
Mar 29, 2020 at 9:52pm
[1 reply] : Use code tags: //Your Code Here You're code looks fine s... (by zapshe)
|
by John3682
palindrome
|
Write a program to get the number from the user and print the th number palindrome of even length. input : Is an integer . 1<= n <=1000000 output : A p... |
Mar 29, 2020 at 9:43pm
[6 replies] Last: hi again . no you're a genius also as i mentioned your code string(... (by John3682)
|
by valiciousx
balances brackets problem(always the output is good)
|
I have to write a program which balances a string with brackets.I wrote the program but it doesn't matter which string I enter because the program always says t... |
Mar 29, 2020 at 8:59pm
[5 replies] Last: I understood.Thank you! (by valiciousx)
|
by dumdumFlame
asterisk pyramid problem
|
I am having trouble with one of the asterisk problems what I need help with is the output of invalid number if you input a negative number. I feel the solution... |
Mar 29, 2020 at 8:29pm
[8 replies] Last: #include <iostream> #include <string> using namespace std; void draw... (by lastchance)
|
by maddimarrone
precision and printing out digits
|
For my lab, I am trying to print out the value of sine using a function. The printed value should display 5 digits after the decimal. However, the angle that is... |
Mar 29, 2020 at 8:03pm
[1 reply] : cout << "sin("<< i <<") = " << sin(valueOfSine) << endl; ... (by lastchance)
|
by tetsuuuu
Using switch statement to get same output
|
How would you write out the code using switch statements to get the same output. If you can, please write a comment next to the lines changed to provide a brief... |
Mar 29, 2020 at 5:37pm
[4 replies] Last: Thanks for the resources. I'll give it a try (by tetsuuuu)
|
by casa fifa
creating a change in a enum in c++
|
I am creating a game when the player lands on "F", the enumeration in the player class has to change between good and bad. For example, if the player already... |
Mar 29, 2020 at 5:22pm
[1 reply] : You already have a Player class, add a member data that encapsulates t... (by deleted account xyzzy)
|
by arczi w
Classes derived from the same base
|
Suppose I have the following code: class animal { public: bool is_male; long double strength; }; class fish : public animal{}; class bear : public animal{... |
Mar 29, 2020 at 3:46pm
[4 replies] Last: Thank you for your help! Can you further explain why the class needs t... (by arczi w)
|
by LakySimi1
(Easy, i think) array sorting problem
|
Hi everyone, i'm making a raycasting renderign engine, i have to sort by distance the sprites, from further to nearest. First of all i scroll (sorry for my bad... |
Mar 29, 2020 at 3:17pm
[5 replies] Last: Thank you all for responding! I didn't know about std::sort(), by the ... (by LakySimi1)
|
by tashmanm
How to NOT skip a line in output
|
Write your question here. #include <iostream> #include <iomanip> using namespace std; int main(void) { double a; double b; co... |
Mar 29, 2020 at 10:54am
[3 replies] Last: Hello tashmanm, To the right of the code box there is a gear icon and... (by Handy Andy)
|
by tambravan
Character array initialization
|
Hello guys, I'm working with a class that contains an 2-D array of characters (char ). In my constructor, I am taking in a string, with length a*b (dimensions... |
Mar 29, 2020 at 3:09am
[7 replies] Last: Thank you so much for all the help! I really appreciate it. (by tambravan)
|
by tashmanm
how to input string variables with multiple words
|
How do I input string variables that are multiple words. I am using #include <string> using namespace std; Then: string variableName; then: cin ... |
Mar 29, 2020 at 2:00am
[1 reply] : Formatted input: cin >> something; Unformatted input: getline( cin,... (by Duthomhas)
|
by Utku
SFML adding an object with respect to other ones
|
In my SFML application, I want to add waypoints to the specific coordinates. However, I want to add them with respect to other objects. For example; https... |
Mar 28, 2020 at 6:16pm
[3 replies] Last: so instead of a.x = X a.y = Y you want to do a.x = b.x + offset_x a.... (by ne555)
|
by Homedogslice
function not compiling
|
It's hard to find a discussion post with super basic errors like this. Can someone tell me what I'm missing? I wrote another function above this function th... |
Mar 28, 2020 at 9:23am
[2 replies] Last: Hello Homedogslice, Actually all you need is or (i = 0; i <= numTerm... (by Handy Andy)
|
by GeorgeSDG
Is element in array: true/false
|
Very basic question: Is there a way to return a TRUE/FALSE if an element is in an array or not? Say I have int myArray = {x, y, z,}; where x-z are integers. ... |
Mar 28, 2020 at 4:43am
[10 replies] Last: All right then Fry... #include <cmath> #include <functional> #inclu... (by Duthomhas)
|
by knxknx
void function output
|
I have a program to output the phonetic version of a string input, however I cannot seem to get it to output in one line, it currently is outputting one charact... |
Mar 28, 2020 at 12:33am
[1 reply] : There’s a number of issue in your code. Some of them: 1) Declare yo... (by Enoizat)
|