General C++ Programming - December 2020 (Page 3)

by hp14
Function
 
Is somebody able to write a function that changes the information in a board for another string of caracters?
[5 replies] Last: [quote=hp14]Is somebody able to write a function that changes the info... (by lastchance)
How can i use getline function to display pointer to an array.
 
how can i use cin.getline function to display an array whose size is not determined and it is dynamically allocated in the memory. little helpline will be highl...
[2 replies] Last: std::vector<std::string> lines; for (std::string line; std::getline... (by seeplus)
want to use vector and hash table vector array
 
// // main.cpp // Final_project_part-1 // Created by Tanvi and Jessica on 20/11/20. // #include "header.hpp" //bool isValidDate(int, int, int); void...
[2 replies] Last: vector <apartment> apt ; This probably doesn't do what you think ... (by seeplus)
help to implement hash table in my project
 
I am making apartment leasing system, In that I want to use hash table to store my key and values in bucket. But I don't know how I can implement that in my pro...
[1 reply] : You could use a std::unordered_map to create your hash table: https:... (by George P)
Help in understanding assembly
 
Hi guys, So I'm following along with the famous or rather infamous depending on how you look at it "Smashing the stack for fun and profit". My assembly experti...
[1 reply] : it doesn't show the assembly for the function "function" because we a... (by helios)
by dean
Deadlock
 
Hi all, the following snippet of code ends up occasionally in a deadlock, can anyone figure it out why? mutex mutex_; condition_variable condvar; boo...
[5 replies] Last: Hi, thanks for the clarification! I now understand the issue. (by dean)
I have to use magic numbers to display values in the correct position in an array. How can I get rid of it?
 
Sorry if the code is too long. I just wanted to give a detailed description of the situation I am facing I'm coding a game called Battle Ship. The following ...
[1 reply] : most of the time magic numbers are eliminated simply by giving them a ... (by jonnin)
error: default argument given for parameter 2 of ..
 
I am not a professional C++ programmer and I apologize in advance if the question seems obvious. I use [this partially observable Markov Decision solver] for m...
[1 reply] : Remove the default argument from the definition. It's enough to have i... (by Peter87)
Getting Data: undeclared identifier and 'std::vector': 'Data' is not a valid template type argument for parameter '_Ty'
 
I'm using a linear regression algorithm and I keep getting Data: undeclared identifier and 'std::vector': 'Data' is not a valid template type argument for param...
[8 replies] Last: @lastchance Thank you so much for all your time. You've been a big hel... (by ahmadalibin)
vector and mats
 
This question boils down to this throwing an exception: <Mat L = m * v> The reason is the although m is a 3 x 3 matrix (camera intrinsics) it cannot be multip...
[8 replies] Last: Keskiverto wrote: The cv::Mat seems to have multiplication for Ma... (by technologist)
by mnm71
How to use the template class in another class?
 
I have this template class and I want to use it in another class but I have trouble with FloatStack fs(5) ; how should I fix it? #ifndef STACK_H #defin...
[2 replies] Last: The a default-member-initializer must be a brace-or-equals-initiali... (by JLBorges)
RegEx problem
 
Hey All, I'm just starting into regular expressions in C++ and I've noticed a couple problems. I spent 20+ years using them in perl so there are certain thin...
[11 replies] Last: Reported to Microsoft 12/12/2020. (by lbrandewie)
by Bob O
Help with selecting a graphics library for Visual Studio C++
 
Hi, I am an embedded C programmer. I am working on a project which collects a lot of data from multiple sensors. I need to be able to display this data in ...
[2 replies] Last: You can use the console for barebones graphics via gdi. Here are my c... (by oggin)
by arkkay
Help with downcasting
 
Hi, I have some C++ code and I'm not sure how to properly downcast a class. I have a generic structure (called Base) and a bunch of derived classes (100+ of the...
[12 replies] Last: The library, still in it's infancy, is here: https://github.com/rkuris... (by arkkay)
by WieseF
Selection Sort incorrectly switched last 2 indexes
 
I have been working on this program using classes and a couple of parallel arrays however I have a sort method that continues to switch the last two indexes whe...
[2 replies] Last: Referring to salem c 's code, line 3 appears to be causing you to ind... (by AbstractionAnon)
error: no matching function for call to
 
I am trying to apply [this POMDP solver with a given example] to my decision making problem and I followed the documentation in the repository to build differe...
[2 replies] Last: src/starmaze.cpp:369:49: error: no matching function for call to 'des... (by AbstractionAnon)
Defined algorithm for Market exchange bidding
 
I have a market exchange simiulation which carries out trading activities such as bidding for and offering trades. I have to decide when and how to generate bid...
[1 reply] : I would say that "defined algorithm" is simply one that you write that... (by AbstractionAnon)
Prevent overflow in Linear Regression algorithm
 
I am implementing a linear regression algorithm to generate market price predictions using some price values that the program is reading from a csv file. The ve...
[6 replies] Last: You can compare standard linear regression with your slightly odd vers... (by lastchance)
Strange Cout
 
cout << "INSERISCI STRING1: "; cin >> string1; cout <<"INSERISCI STRING2: "; cin >> string2; if i write in this way the output is inserisci strin1:""...
[9 replies] Last: Thanks @Ganado you got it! (by JosepH2OW)
by jonnin
Need help with a code that solves linear equation using elimination method
 
what help? Doing it for you is not 'help'. Help is where you do something and ask a question, not post a homework assignment with no effort shown.
[8 replies] Last: Ha, I assumed you were OP. (by Ganado)
December 2020 Pages: 123456
  Archived months: [nov2020] [jan2021]

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