Beginners - February 2018 (Page 4)

by urko18
How go back in code of Arduino
 
Hello! I would like to know how I can go back in the following code: #include <ax12.h> //Include ArbotiX DYNAMIXEL library const int SERVO_ID = {1, 2, 3, 4...
[4 replies] Last: Maybe something like this: bool is_Y_pressed = false; void loop() { i... (by coder777)
user defined functions
 
Currently working on a program for my intro to C++ class, using user defined functions. It is still in the works, so not a finished product by far. I plan on us...
[2 replies] Last: Cool thanks for the feedback. I was struggling figuring this out. The ... (by link45jeff)
Print a Square with function using nested loop
 
The question is this: a = square, b = Z, c = X You need to input a or b or c and the size of the shape. It is required to use function with nested loops I...
[4 replies] Last: @ar2007 Yesssss!!! You explained it very wellllll !!! I get ittt!! Tha... (by Newbieess)
by Ephan
Can not fix the error..
 
Hi guys. The following program checks if a number is a perfect square. #include <iostream> using namespace std; int main() { bool perfect_square = true; in...
[2 replies] Last: Thank you so much. Perfect. I can not believe I missed the == in an i... (by Ephan)
Help with Palindrome Project
 
Hello All, I have recently started my education path for getting into the cybersecurity field. I am currently in a C++ course and learning the ins and o...
[2 replies] Last: Ganado, Thank you for all of that information. I used the void o... (by Cryptic HyRulian)
if/else statement for an input file
 
I set up the code to read the file, which has 12 lines of xi, and yj components to give magnitude and direction, some of them are incorrect (on purpose) and i w...
[7 replies] Last: #include <cmath> #include <iomanip> #include <iostream> #include <sst... (by mbozzi)
Numbers past the decimal point troubleshooting
 
Hi folks, I am very new to programming, like many people who are posting on this beginners forum. The issue I am having is with showing numbers past the deci...
[2 replies] Last: std::cout << std::setprecision(0) << std::fixed; (by SamuelAdams)
by JM567
Lottery Game
 
We have been studying arrays and I am very confused. A user enters one number, it is checked against the random number array, and then if the user input matches...
[4 replies] Last: Thank you so much for your help! (by JM567)
Bug moving a box problem
 
The assignment is "A SpiralBug can occupy any integer coordinates (x, y), where x and y can be 0, negative, or positive. It starts at (0, 0). For the next n ste...
[3 replies] Last: Yes, that sounds correct, I believe. Every other movement, you increas... (by Ganado)
Code Modification
 
I wrote a roll dice program for a C++ class, and it works perfectly when run. However, my professor is asking me to do the following modification: "Please move...
[3 replies] Last: Okay, I understand now. Thank you both for the great explanations! :) (by closed account o1pz6Up4)
by aa3685
How to use nested for loop for a pattern?
 
What is an example code for a pattern?
[1 reply] : // Example program #include <iostream> int main() { for (int y =... (by Ganado)
Returning a local instance out of scope, help!
 
I am currently writing a custom string class that uses cstring to store the data. On top of that, I am writing operator overloads. Here is what I'm trying to pe...
[1 reply] : Don't cross-post. http://www.cplusplus.com/forum/general/231761/ (by helios)
Random number generator
 
Hi guys so I know how to use rand() first you need to use the srand() to seed it then you can call rand() and you should get random numbers based on unix time a...
[7 replies] Last: thanks guys bad naming conventions and mixing the x and y axis did in ... (by adam2016)
Need Help with division Issue
 
This code is supposed to calculate the speed(mph) traveled, by entering the miles traveled and the time it took. This issue is when I enter 5 for "miles" and 2 ...
[2 replies] Last: Thank You! (by Drake5006)
What am I doing wrong?
 
(revised) First off. I am a total noob. Secondly, I can't figure out what I've done wrong with this code for calculating the amount of calories an individual ne...
[4 replies] Last: also another bug I noticed is calories = weight(weight * 15); ... (by adam2016)
Exponent using functions in a while loop
 
All works except once you do two numbers above 9 to the 9th in the while loop, so 10 to the 10th, it does an extra loop and gives the wrong input. We are req...
[2 replies] Last: long long is the magic! thank you so much I had changed it to long an... (by marykayr)
prototype function error when i try to pass a string.
 
I am really confused because when I try to do a simple string pass it gives me a "string:undecalred identifier" and "syntax error: missing ')' before identifier...
[2 replies] Last: Since your function prototype is before the using namespace line you n... (by jlb)
console snake game hit not being detected
 
Hi guys I recently asked a similar question sorry about posting another thread I just have decided to start over because the thread was poorly explained and the...
[2 replies] Last: wow nice spot Peter :o this bug has was "bugging" me for hours,it wor... (by adam2016)
please help
 
i cant solve this error.Please help.i'm a beginner switch(input) { case 1: add=num1+num2+num3; cout<<"The total answer is:"<<add<<endl; } {...
[4 replies] Last: @mister2018, Your case blocks of code should have a break; statem... (by closed account E0p9LyTq)
Problem with an recursion
 
Hi! My task is to find n-numbers which sum of pow(of it numbers) For example I must input N=3 ,and program must show me 100 . Where is my mistake ??
[2 replies] Last: Yes! Thank you, I must create my dynamic array after inputting n from ... (by Saninani)
February 2018 Pages: 123456... 28
  Archived months: [jan2018] [mar2018]

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