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 ...
Nov 19, 2019 at 7:43pm
[5 replies] Last: I thought they would essentially provide the same function when work... (by deleted account xyzzy)
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...
Nov 19, 2019 at 6:56pm
[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> ...
Nov 19, 2019 at 4:05pm
[4 replies] Last: I don't see anything about it mentioned in the screenshot example abo... (by deleted account xyzzy)
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...
Nov 19, 2019 at 2:45pm
[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? ...
Nov 19, 2019 at 1:07pm
[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...
Nov 19, 2019 at 12:29pm
[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...
Nov 19, 2019 at 11:29am
[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...
Nov 19, 2019 at 8:29am
[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...
Nov 19, 2019 at 6:57am
[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...
Nov 19, 2019 at 5:23am
[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...
Nov 19, 2019 at 5:12am
[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...
Nov 19, 2019 at 4:33am
[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...
Nov 19, 2019 at 3:25am
[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:...
Nov 19, 2019 at 1:33am
[8 replies] Last: That fish code is so cool I bookmarked the post. (by deleted account xyzzy)
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 ...
Nov 18, 2019 at 8:51pm
[4 replies] Last: <limits> is needed for getting the maximum size of the stream. Line... (by deleted account xyzzy)
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...
Nov 18, 2019 at 7:43pm
[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? ...
Nov 18, 2019 at 3:45pm
[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...
Nov 18, 2019 at 9:49am
[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 ...
Nov 18, 2019 at 9:20am
[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...
Nov 18, 2019 at 8:59am
[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.
Registered users can post in this forum.