Beginners - November 2019 (Page 6)

Difference between std::strings + and += operators?
 
Hey guys, so I noticed the + and += operators give much different results, I have written a printBinary function which I studied from an online source, when ...
[5 replies] Last: I thought they would essentially provide the same function when work... (by George P)
I need to open new counter when old one closes
 
I am making a larger program that has the following part: I will avoid putting the larger one and work out how the solution to this problem applies to that on...
[4 replies] Last: void foo(int * ip, int size) { code... } int x ; foo(x,3); //pass i... (by jonnin)
by Zii
Why is (10*5) giving me 2?
 
I mean... I really don't get this. Line 21... Yet when I run the program it gives me: Name : John Doe Result :2 ...what? #include <iostream> ...
[4 replies] Last: I don't see anything about it mentioned in the screenshot example abo... (by George P)
What's the difference between . and ->
 
There are two operators . and -> in c++,I know when you want to get a variable or function of an object of a class,you should use . But when I want to get a fun...
[4 replies] Last: But what does b.val mean? Nothing. It's illegal syntax, assuming... (by MikeyBoy)
Problem with floating variables (1,2)
 
How to display the decimal of floating variables? This program is to examine the prim number and quotient but the z variable doesn't output fraction.. why? ...
[31 replies] Last: MikeyBoy if you have any advice to me in order to improve my progra... (by semsemdiver)
Help with modbusrtu
 
#include "ModbusRTU.hpp" #include <iostream> ModbusRTU::ModbusRTU (uint8_t id) : _DO(20), _AO(10) { _id = id; for(unsigned i = 0; i< _D...
[2 replies] Last: I do not know at the moment if this will make any difference, but per... (by MikeyBoy)
Error using time for update
 
Error: 'tm' is not a member of 'std'. from /usr/include/time.h:39:0 //Dies ist die zu verwendende Funktion ModbusRTU::ModbusRTU(uint8_t id): _DO(20), _AO(1...
[2 replies] Last: Hello MaydayMayday, PLEASE ALWAYS USE CODE TAGS (the <> formatting ... (by Handy Andy)
by Bopaki
Not sure as to why I am getting a garbage output there
 
I get: C:\Dev-Cpp\chapter3>question17 `8= C:\Dev-Cpp\chapter3> #include<iostream> #include<string> #include<cassert> #include<iomanip> using...
[3 replies] Last: Thank you all!!!! I got it right eventually newString s1, s2, s3; ... (by Bopaki)
Help needed making an array list in descending order
 
Hi, I was having trouble displaying the numbers in descending order and would love the help. The text file i used has the numbers: 106 102 109 104 105 106 107 1...
[7 replies] Last: Yeah (by Depressed)
Delete piece of a file.
 
So. I am trying to make a program that just stores strings in a file. I haven’t actually implemented any of it yet, but I have encountered a problem. There is...
[2 replies] Last: Darn. Ok, Thank you! (by highwayman)
0xC0000005 Error for my PriorityQueue template
 
So, like the title says I'm getting a Process returned -1073741819 (0xC0000005) error for a Priority Queue template I've been working on. Here's the h. file...
[2 replies] Last: Welp. I finally solved it. If, for some reason, someone else is having... (by sadCoder)
Easyish C++ coding
 
Please help with this 5. Declare the following variables: double input1 (first user input), double input2 (second user input), double minimumValue (lower input...
[4 replies] Last: Hello cgperez, PLEASE ALWAYS USE CODE TAGS (the <> formatting butto... (by Handy Andy)
Programming Assignment
 
[ You by now have lots of practice with built-in types such as float, int, etc. You also have practice with incorporating these basic types into certain con...
[13 replies] Last: Hello bethmayweather, I had to change a lot to make it work, but it i... (by Handy Andy)
rectangle
 
EDIT: It appears the OP has swum away. Can someone write the whole cod please? There's something "fishy" about this! Ah, yes, seen this post before. http:...
[8 replies] Last: That fish code is so cool I bookmarked the post. (by George P)
by Zii
Stuck in infinite loop when executing else statement
 
#include <iostream> using namespace std; int input; bool quit = false; char another; int main() { while(!quit) { cout << "Check whether a number is ...
[4 replies] Last: <limits> is needed for getting the maximum size of the stream. Line... (by George P)
Screen Buffer - Confusion over function pointers
 
Hi, I've been upset with the tft I'm using with a teensy synth project flickering when I call functions that update the screen. Someone told me that I need...
[6 replies] Last: Hi Salem Thanks for the tips! The Serial.prints were just so I coul... (by plushterry)
by medosz
logical expression
 
I have 4 pair of logical expressions, each pair should be logically equivalent. Can anyone explain why the third pair does not give the same resoult please? ...
[1 reply] : Change those lines to int c = !(x<3)&&!(y>=2); int d = !((x<3)||(y>=2... (by lastchance)
Help in this question
 
There are N cities that are connected by N-1 roads.K cities have bus terminals and other N-k cities have bus stops. A bus terminus is a designated place where a...
[4 replies] Last: Ok I am trying (by counter strike)
Arduino C++ code run efficiently advise
 
Hi guys i've gotten back into coding so i'm super rusty at it i'm making a program for my manual car using arduino - joystick(X,Y axis) so far i've ...
[5 replies] Last: thanks jonnin, i will be throttling it so far i've dropped it down t... (by learningcplusplus898)
Sales and Salary
 
I have this program and I'm stuck, the output isn't correct, unsure of what is going wrong, but I need assistance. Here is the problem with code and output. Tha...
[9 replies] Last: [quote=CodeNovice01]On line 67, why is the +1 necessary? Line 67 say... (by lastchance)
November 2019 Pages: 1... 45678... 17
  Archived months: [oct2019] [dec2019]

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