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

value truncated, undesirable
 
For the following function, N in "n=" line has 3 values when executed N=[0, 0, 586218.1824]. Whe...
[4 replies] Last: This worked great, below, thank you: ... std::cout << "std::setprec... (by technologist)
Sorting coordinates stored in 2d array
 
Hello! I've been recently working on graph problems and problems with coordinates, and I found that ...
[4 replies] Last: > Now this means that if I ever need the Nth coordinate, > I could ea... (by JLBorges)
Function for returning total weigth of a train
 
How can I override a function to return the total weigth of a train?? class TrainRoute { .... int...
[1 reply] : To override a function, you have to declare it virtual in the base c... (by AbstractionAnon)
Algorithmic Truck Problem
 
Hello! I've been working on programming problems involving graphs, and I found an interesting one I ...
[3 replies] Last: I think I should have mentioned, if both trucks reach an intersection,... (by BBrandon)
Finding an optimal solution to a system of linear equations in c++
 
Here's the problem: I am currently trying to create a control system which is required to find a ...
[3 replies] Last: when I did controls algorithms, it was often, but not always, the case... (by jonnin)
How to define a non blocking input in C++
 
0 I'm making a multithread application in C++. In particular, a secondary thread is involved in in...
[1 reply] : Standard streams are inherently blocking. If you need non-blocking con... (by helios)
having a few problems with my code - output
 
Hey all im trying to get my code to work but I get a few errors in the int main Anyone able to help...
[2 replies] Last: As you are using fixed size record file binary read/write for the clas... (by seeplus)
Almost done random number generator. Help please
 
The OP post has been deleted. Quoted here: [quote=olorin82]Hi I can make the program generate rand...
[8 replies] Last: Seeplus, your code runs well on my 64 bit g++ --version 8.1.0 (mingw)... (by oggin)
by Feit
How to find the index of a randomly selected element of an array in C++ (1,2)
 
Hi all, I am new in C++ programming. I need to randomly choose an element from an array and the...
[24 replies] Last: @Feit - done! (by seeplus)
Question about reinterpret_cast usage
 
Hello. I recently was wanting to std::cout a hex value to the console but it kept evaluating the h...
[1 reply] : If you want hex, do this std::cout << std::hex << std::showbase << 0... (by salem c)
How can I read file at certain path?
 
[Closed by author]
[6 replies] Last: Well, I am not actually making anything for windows. I am making a 3ds... (by SirEnder125)
C++ Program to display Information about Medical personal
 
Having a difficult time writing a code to display the information on medical personal, this is what ...
[13 replies] Last: So fix it. You declared a bunch of functions but failed to implement t... (by jlb)
Djikstra Algo Ouput Problem
 
Hi, I am currently doing a project on Graphs and its almost complete. Whenever i enter a char other...
[1 reply] : You can simplify some of the code: void printPath(int parent , int ... (by seeplus)
tellg() and get()
 
I have written a simple algorithm to read a text file backwards: int main() { ifstream file("...
[2 replies] Last: get() reads and moves the file position This is exactly what I want... (by gedamial)
by JeanzZ
New to c++ problem with small bit of code im working on
 
Trying to get this code to work but having no luck.Thank if anyone can show what i need to do. #in...
[2 replies] Last: This will now compile, read the data file and display it's contents: ... (by seeplus)
Help with Using string class member functions please
 
Hi here's my task an below is most of the code already done. Thanks for any guidance: Develop t...
[2 replies] Last: .find() returns the position of the beginning of the found string. Co... (by seeplus)
How to Implement classes?
 
Hi can you guide me on how to implement member functions of LimitedCounter, OverflowCounter and UseC...
[2 replies] Last: It worked perfect. Thanks! (by closed account j3wpz8AR)
Meaning of Arguments in Main Function
 
Hi, I have a question about a main function with the following arguments: int main(int argc, ...
[2 replies] Last: https://www.gnu.org/software/libc/manual/html_node/Program-Arguments.h... (by keskiverto)
[BCC32 Error] pFIBScript.hpp(61): E2040 Declaration terminated incorrectly
 
Hi, I inherited a project in RadStudio 2007, which uses FIBScript version 1.8b2. Compiled FIBScript...
[1 reply] : show the code around line 61 of the offending file. its likely a ; p... (by jonnin)
const char[3] does not generate template parameter of char[3]!
 
The code: template<typename T1, typename T2> struct Pair1 { T1 first; T2 second; Pai...
[8 replies] Last: ok so the compiler is not giving very clear diagnostics! Thanks @Cubbi... (by JUANDENT)
December 2020 Pages: 1234... 6
  Archived months: [nov2020] [jan2021]

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