General C++ Programming - October 2019 (Page 5)

Vowel chain in binary tree
 
Hi, I'm working on a project : Given an alphabet binary tree, find the length of the longest vowel chain and the node IDs on that chain. The length is defined ...
[3 replies] Last: awesome, your program crashes and you didn't even notice. run your pro... (by ne555)
Force originally global variable to be nearer
 
Is there C++ feature to force an originally global variable to be near or in the closest distant to the operation require it but cannot redefined within the sco...
[3 replies] Last: Great insight! Thanks. (by marhuum)
Class function problem
 
Hello. I'm trying to create a function in a class Complex that assigns one complex number to another one and return the result in a complex object, and another ...
[1 reply] : Since your class just has 2x floats in it, the assignment operator tha... (by Ganado)
Seek example of Range for in C++ 17 where end expression is a different type than the begin expression
 
In dealing with range for in C++ 17 standard, the end expression type may be different than the begin expression type, which allows for the range be delimited b...
[4 replies] Last: :) (by Thomas Huxhorn)
Why use && in range for?
 
Hi, I ran into an example of a range for where the elements are extracted using auto&&. Why is this? Why not use auto& ? What is the difference? The code ...
[2 replies] Last: https://blog.petrzemek.net/2016/08/17/auto-type-deduction-in-range-bas... (by Repeater)
LHS and RHS
 
Jojo is learning new subject, Calculus I, and recently he found some difficulties. The Lecturer assign some exercises about inequalities and apparently, Jojo qu...
[4 replies] Last: Depends on the input format. What's the input format? Is it 1 2 3 4 ... (by Repeater)
Binary tree constructing
 
Hi ! Following is an input files, which states the information of each node in a binary tree : 9 1 e 0 0 2 z 0 0 3 e 1 2 4 i 0 0 5 e 0 0 6 h 0 0 7 a 3 ...
[3 replies] Last: How should I connect each node by using a vector container? Is there a... (by calvinfornia)
How do I create co-dependant namespaces.
 
I have the following namespaces: A.h + A.cpp: #ifndef INHERITANCE_A_H #define INHERITANCE_A_H #include <string> #include <iostream> #include "B.h" namespac...
[2 replies] Last: to clarify the last part, there is no reason for A.h to include B.h an... (by ne555)
Longest path with same values in a binary tree
 
Hi, here's a source code of a program working on the longest path with same values in a binary tree. Given a binary tree, find the length of the longest path w...
[2 replies] Last: Got it ! Thanks a lot ! (by calvinfornia)
member initialization
 
I would appreciate any help I have a point class as such: class Point { int x, y; public : Point (int xx =0, int yy =0){ x = xx; y = yy ;...
[2 replies] Last: Thank you for your reply. I think I'm supposed to use this inside the ... (by Leo78963)
by ne555
Visual Studio 2017: How to use traditional multi-translation-unit builds for debug mode
 
I thought the whole point of unity build was to reduce build time. perhaps //in main.cpp #ifndef DEBUG //include all sources #endif then you'll need to taylor...
[3 replies] Last: Spam links added in an edit. (by deleted account xyzzy)
C++ PROBLEM (HELP)
 
Ok So i have a university project . i must write a program that allows the user to select if he wants to add multiply subsctract divide or have the remainder of...
[3 replies] Last: The code doesn't even compile with the right compiler settings like -W... (by Thomas Huxhorn)
Create a static class function that takes an infinite number of arguments
 
Hello! Using a template I've created a function that accepts an arbitary number of arguments. It's called classless_print and it works: #include <iostream> t...
[5 replies] Last: I am also a beginner . So, i just want to know about the given topic w... (by archanasinghr)
Question about 2D Array
 
Hey guys, I have a question. Please reference this YouTube video. Skip to 2:46 minute. https://youtu.be/Hq4NXKg84gM You will see that there is a function c...
[2 replies] Last: In an expression like cout << "Hello\n" , the type of the string lite... (by mbozzi)
Pointers and Arrays.
 
cpp.sh/6eukj link above is my code i'm not sure what i did wrong but the personality.out is print not correctly. Please help thank you Here is the...
[4 replies] Last: You need to add "9" as the first line of personality.txt. When I do t... (by dhayden)
How to add Error Checking
 
I've written a program to create two random arrays, splice the first up to a point the user chooses, and combine the splice and second array to a third array. M...
[11 replies] Last: std::cin >> firstArraySize; // Assings inputed size to first array. ... (by Repeater)
Reverse 2d array (HELP!)
 
Hello again guys, i have this following assignment: Marks obtained by all students are stored in a two-dimensional array. Each row records a student’s marks ...
[3 replies] Last: Dice que necessitas una lista de las sumas de todos los grados para ca... (by Duthomhas)
callback function without brackets??
 
Hi Guys, I met a little problem when I looking into the library of ESP32 library: https://github.com/espressif/arduino-esp32/blob/0cdfb0b193d9bf04adc50bf0d6020e...
[4 replies] Last: You are misreading it. (Sorry.) I think you are using the term “bra... (by Duthomhas)
C++ OOP - Brainstorming what class and what we need
 
Hey guys, I am practicing and learning. I tried to make a simple game which was Rock, Paper, Scissors which I did okay and completed. But now I want to do th...
[10 replies] Last: careful with the operator. R beats S but R<S in that enum. you can... (by jonnin)
My word count adds other files word count together...
 
Hi, I was wondering if anyone could help me fix my word count accumulating other files word counts and make it so where it restarts all over again and just read...
[6 replies] Last: Wouldn't you think it would be a bunch simpler to copy the entire fil... (by dhayden)
October 2019 Pages: 1... 34567... 10
  Archived months: [sep2019] [nov2019]

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