Beginners (Page 6)

Methods documentation style
 
Hello, I have been writing code in python for years, and I really like how the documentation of the methods go inside of the body it self. I see that in C++ th...
[7 replies] Last: yes, it can be hard to read. I have, on top of grep, 3 or 4 half page... (by jonnin)
errors in UNDEFINED symbols code
 
Hello! When i am define symbol in eclipse-based Vitis, the code that is UNDEFINED is gray colored so it is not meant to be compiled. However i am getting er...
[4 replies] Last: If you can not change the code in question, and if that code does ... (by kigar64551)
Merge the mutiple 2D matrixes vertically
 
Hello fellows, I am trying to merge a few matrices that I obtained from the function MatrixObtain. The function works fine. The function MatrixObtain returns...
[1 reply] : If there is a variable named row that is in scope on line 4 you're n... (by Peter87)
Constructing binary tree
 
Hello everyone, I need to construct a binary tree with the 0 and 1 values based on a condition starting from root node 0. I have an array arr=[ 4 6 1] . If th...
[15 replies] Last: Thank you so much @lastchance for all your helps. I understood it bett... (by learner999)
Check if an object has a member
 
Hello, I am trying to check if a given object has a member. For instance: #include <iostream> #include <string> #include <vector> class Animal{}...
[13 replies] Last: I was referring to run-time checks - post amended. (by seeplus)
How do I properly return an object and set it to a new object?
 
Hey everyone, I'm trying to make a simple lexer that splits up a given string into tokens. As you can see below, I have a Token class, and a Lexer class. I wa...
[7 replies] Last: @seeplus Thank you so much for all the tips! (by gabriel11)
While loop combined with input fail state loop
 
I am trying to run a while loop that has a range between 0 and 6 but if you input a character the while loop exits and the program goes into a fail state. I am ...
[5 replies] Last: #include <iostream> #include <concepts> #include <string> template <... (by JLBorges)
Decoding character positions into a message
 
Hi! I am trying to decode a text file that holds a pair of integers that represent [lineIndex, characterIndex(in that line)] and find the character with thos...
[3 replies] Last: Without file2 data checking: #include <fstream> #include <vector> #... (by seeplus)
Coding a Book Cipher C++
 
Hi, I am trying to code for a "Book Cipher". I need to write code that encodes and decodes. For encoding, I need to read a text file from the command-line and ...
[10 replies] Last: @d3sousa92, The following lines take the pairs of integers (represent... (by lastchance)
Book Cipher C++
 
Hi, I have read two previous posts on this forum about coding a Book Cipher in C++. I am very very new to C++ and have a lot of trouble trying to figure out a f...
[13 replies] Last: Yes, thank you have been so much help! You are the best!!! (by d3sousa92)
C++ function array
 
C++, how do I add function where it can find the mean/med of an array? Please check my code, it gives me wrong output in the median function. #include<...
[3 replies] Last: You don't say what you are being asked to do. However, the class name ... (by seeplus)
Dynamic allocation and functions
 
Consider the sippet below: char *func(void) { char *str = new char ; str = 'a'; str = 'b'; str = '\0'; return str; } int main() { ...
[16 replies] Last: Thank you all for contributing to this topic, I learn so much from you... (by ninja01)
New to learn Cpp
 
Hello everyone i am in the First Year of my engineering and new to learn Cpp Programming language, can anyone please suggest me the best books/tutorials and als...
[8 replies] Last: My first book was a Sam's Teach Yourself & I love that book. The previ... (by Mr Z)
The worst case of quicksort
 
I have searched online about when will the worst case of quicksort happen, but there are many results like: 1. When the pivot is picked randomly. 2. When the p...
[6 replies] Last: Thanks everyone for the detailed explanation ! (by IHaveSmallBrain)
I don't know why this isn't working?
 
Write your question here. #include <iostream> #include <string> using namespace std; // Write performOperation() function declaration here double ...
[6 replies] Last: if (op == "/") return numberTwo ? numberOne / numberTwo : !(std::c... (by seeplus)
I don't understand recursion in binary search tree
 
I have program that print the nodes of a BST in inOrder() traversal. void inOrder(Node* root) { if (root != nullptr) { inOrder(root->left);...
[6 replies] Last: Thanks everyone ! (by IHaveSmallBrain)
Program terminating after std::out_of_range while trying to find EOF
 
Howdy yall, I am trying to count the number of rows in a .csv file however I have repeatedly run into a problem while running it where it will work until the 2...
[8 replies] Last: However, I think the logic is not right for reading the csv file. I th... (by seeplus)
Binary Combination of a given N
 
Hello everyone, I need a small help. I need to store binary combination of a given a positive integer number N in a vector. Say N=2, so I need to obtain first...
[10 replies] Last: using u32 = std::uint32_t; u32 constexpr avail_mask = 0b0001111; // ... (by mbozzi)
C++ class declaration
 
I often gets confused on this as I am reading some of the libraries that I am using in my code and how they are being used. Some classes are declared like Opti...
[8 replies] Last: x = y; x is on the left, in english, its the Left Hand Side (lhs) y is... (by jonnin)
by Tima11
I get many errors when including stb_image.h
 
Hello, I am working with stb library. This is my texture.cpp file: #define STB_IMAGE_IMPLEMENTATION #include "stb_image.h" class Texture { public: const c...
[2 replies] Last: Oh, it worked. Thanks! (by Tima11)
Pages: 1... 4567
  Archived months: [jul2022]

Cannot post in this page. To post a new message, go to the first page.