Beginners - August 2018 (Page 8)

"Using" question
 
The following code is a slightly modified version of an example in a beginner's C++ book: #include <iostream> #include <cstring> int main() { using s...
[4 replies] Last: Thanks for everyone's reply; I learned a lot about the global namespac... (by Bob at Subaru)
Need Help with Programming Problem
 
I have thought about this problem for extremely long, and absolutely cannot think of a solution. Question follows. Write a program that prints all the 3-digi...
[10 replies] Last: icy1, exactly what I was looking for, we are not supposed to have lear... (by aceadams)
by koce
simple function performance
 
Hi, I am coding a simple task by both C++ and C#,and compare the results. Each time I amend the algorithm to achive better, C++ takes the lead being 20-30%...
[17 replies] Last: just give a fully working mini-example, including mini-example of the ... (by icy1)
nested loop just outputting garbage noob
 
i have to create a card game with 30 rounds. i have nearly finished but i a struggling with the end. questions are; why is the sorceress not printing cName af...
[6 replies] Last: why is the sorceress not printing after the second round? Is it pa... (by dhayden)
by AL88
Trying to understand function and operator overloading in classes
 
question: Create 2 simplecircle objects, use the default constructor on one, instantiate the other with 9, Call increment on each and print the values, then ass...
[3 replies] Last: In fact, there are a lot of issues. Here it is working; http://cpp.sh... (by Repeater)
Error in function caling
 
Write a function NumberOfPennies() that returns the total number of pennies given a number of dollars and (optionally) a number of pennies. Ex: 5 dollars and 6 ...
[2 replies] Last: @Jonnin Since there is no second parameter in the second calling funct... (by philip1999)
What is the use of & (ampersand) in the given function
 
Define a function CoordTransform() that transforms its first two input parameters xVal and yVal into two output parameters xValNew and yValNew. The function ret...
[3 replies] Last: What is the use of & (ampersand) in the given function Do you unders... (by closed account E0p9LyTq)
2 questions within. please help
 
so, when i am cycling through the loops, after the second round, the sorceress deck stops working and giving me negative numbers and not showing a card name why...
[3 replies] Last: If you don't want to use vectors then just remove them and go back to ... (by tpb)
all links i typed in open all at once, HELP!!!
 
im tryin to make a own "siri" cind of thing, so i made some liks this program can open, but when i type a command like "open weather", all links open at the sam...
[4 replies] Last: The problem of line 46 is the missing input == Remove the \n fro... (by coder777)
by AL88
Why is the second operator function not affecting the variable?
 
why is the second operator function not affecting itsRadius, thanks #include<iostream> class SimpleCircle { public: SimpleCircle(int radius){*itsRad...
[2 replies] Last: Why is the radius accessed through a pointer at all? #include<iostre... (by JLBorges)
can i get some help?
 
see. i am making my own "siri" type of thing, its really simple, if i type in open weather, a link to a weather site opens, but when i type in open weather, the...
[9 replies] Last: thanks alot, i was sceptical if forums would work, but now i have no d... (by navilgameboy)
Squares of Inputted Numbers problem
 
Write a program that outputs the squares of the inputted numbers. The program stops when 0 is entered. Can't use nested loops. Ex( Input: 4 , 5, 6, 7, 0; Outp...
[3 replies] Last: Shouldn't the output for 4 5 6 7 0 be 126 (16+25+36+49=126)? You're m... (by dhayden)
simplest vector graphics forms
 
Hello, I am trying to write a code that simulate wifi strength. The code should take a top view image for the building (building scheme) and place the wifi at...
[2 replies] Last: After half a month: I gave up on the idea of using vector graphics. I... (by John Karror)
PIC ADC issue
 
I am working on ADC with PIC16F1829 and have an issue understanding where the error appears. I wrote a function that samples analogue signal allowing sufficient...
[13 replies] Last: Eventually, it works. I decided to change the analogue channel that AD... (by RytisBe)
Help?
 
Problem follows: Write a program that outputs the squares of the given numbers. The program stops when 0 is entered. Can't use nested loops. I cannot think of...
[3 replies] Last: You should have been able to make the required modification to the ear... (by JLBorges)
How to run methods in an object in a vector
 
How would I do this? I have this code: this->debugLetters .draw(graphics, 0, 0); debugLetters is a vector of Sprites, which has a method called draw()....
[4 replies] Last: Never mind. Thanks for all your replies, but I've fixed it now. (by Salsa Boy)
by clonxy
camera in display() function
 
I have a vector that is 30x17. I want to create a camera where it prints a 9x9 vector of the character '@' where '@' is at the center of the map. If '@' is near...
[8 replies] Last: Yes, that's pretty much it. But WINDOW_SIZE/2 is 9/2 which is 4, not 5... (by tpb)
by Seyter
Whats wrong with my code?
 
Works at first, now it outputs incorrectly. #include <iostream> using namespace std; int main () { int num; cout << "Enter a positive integer:"...
[12 replies] Last: your {} for the if statement is in the wrong place. try this: #inclu... (by clonxy)
by mrmatt
"Multiple definition of 'lcd'" - Issue with C++ for Arduino
 
I'm using c++ to program an arduino. I am trying to separate each of my main systems into its own c++ and header file. I am using a library for the LCD but I'm ...
[5 replies] Last: I have now solved it. Below are the changed I have made: lcd.h: Liqu... (by mrmatt)
by ria1
please explain the example INPUT and Output of this question
 
Link to the Question is -: https://www.codechef.com/AUG18B/problems/KCOMPRES You are given a sequence of integers A1,A2,…,AN. For an integer K, let's defi...
[no replies]
August 2018 Pages: 1... 678910... 15
  Archived months: [jul2018] [sep2018]

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