Beginners - August 2022 (Page 2)

by emcp
my thrift server suddenly not working
 
I have a C++ based Thrift Server coupled with a Python Client (v0.16.0) : https://github.com/apache/thrift Recently I dusted off the project and started updat...
[6 replies] Last: I think my next goal is to learn to use gdb so I can see what is exac... (by coder777)
by Geckoo
Structures, Classes, Parent and children... (1,2)
 
Hello. Coding some single scripts using the Main() section in order to execute the whole code, now I am trying to understand how I should "cut" my code so as to...
[20 replies] Last: ah, good point. I forgot the protected part, so its not the same as d... (by jonnin)
Slicing a given row from a 2D matrix?
 
Hello fellows, I am trying to slice any given row from 2D matrix. I receive the errors Error C3867 'std::vector<double,std::allocator<_Ty>>::size': non-stand...
[4 replies] Last: What is the OP's definition of "matrix," and what is the definition of... (by deleted account xyzzy)
Error in function: no instance of overloaded function matches the argument list
 
I have a script that is working fine, but when I try to write a function with the same script I get the error "no instance of overloaded function "aapx" matches...
[16 replies] Last: Thanks a lot!! This actually was one of the source of my issues! (by JamieAl)
What's wrong in the reading the file
 
Hello fellows. In the following code I am trying to read a file for some mathematical operations. DoOneFile function reads the file and when I uncomment "cout.....
[5 replies] Last: Given the format of the provided file, this will read the data into th... (by seeplus)
by Geckoo
goto jump (1,2)
 
Hello fellows. I remember my first attempts to code something on a personal computer - my old ZX-81. I remember some syntax which allowed me to execute parts of...
[23 replies] Last: I like that first sentence of the first paragraph in the Introduction ... (by deleted account xyzzy)
better way to write this if condition?
 
like the title says and any resource on reducing repetitive code is appreciated. if ( n1 > 0 && n1 < 1001 && n2 > 0 && n2 < 1001 && n3 > 0 && n3 < 1001 ...
[18 replies] Last: With (x >= 1) it checks x>1 before x=1? The compiler will generate ... (by seeplus)
What's wrong in my small code ?
 
In the following code, I am trying to assign the sum to the cost_temp . When I comment the line : cost_temp = h_sum + P_sum + f[Period ] the code works wel...
[10 replies] Last: Thank you so much all of you @seeplus, @JLBorges, @George P @jonnin. A... (by learner999)
Help with c# Unity code
 
How can I make my trajectory path rebound off of a box collider with this code below? using System.Collections; using System.Collections.Generic; usin...
[4 replies] Last: As I said often here, I used Unity for a long time for GameJams like L... (by Geckoo)
how to implement this for loop that loops through a loop here better (C++)?
 
Hello, I am a beginner in C++ and I am making a simple hangman game. While making the text writer, I ran into some problems. I spent around 3 hours just on thi...
[2 replies] Last: I am a beginner in C++ What resource are you using to learn C++? A... (by seeplus)
C++ Review Questions (1,2,3,...,7,8,9,10)
 
Restarting my review question list with hopefully shorter & simpler questions that I had when reading about C++ in my book. QUESTION 1) In method DisplayConten...
[182 replies] Last: There are rare situations where a singleton class-object is actually r... (by JLBorges)
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)
August 2022 Pages: 123
  Archived months: [jul2022] [sep2022]

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