
please wait
by technologist
value truncated, undesirable
|
For the following function, N in "n=" line has 3 values when executed N=[0, 0, 586218.1824]. When I break it down to C = (N.at<double>(2))the 586218.1824 h... |
Dec 20, 2020 at 2:48pm
[4 replies] Last: This worked great, below, thank you: ... std::cout << "std::setprec... (by technologist)
|
by BBrandon
Sorting coordinates stored in 2d array
|
Hello! I've been recently working on graph problems and problems with coordinates, and I found that if I knew how to create a specific function, it would be qui... |
Dec 20, 2020 at 11:08am
[4 replies] Last: > Now this means that if I ever need the Nth coordinate, > I could ea... (by JLBorges)
|
by Mircea1990
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 totalWeight() { return 100; } } class FreightTrainRou... |
Dec 19, 2020 at 5:46pm
[1 reply] : To override a function, you have to declare it virtual in the base c... (by AbstractionAnon)
|
by BBrandon
Algorithmic Truck Problem
|
Hello! I've been working on programming problems involving graphs, and I found an interesting one I just couldn't get an efficient program for. So the problem g... |
Dec 19, 2020 at 3:18pm
[3 replies] Last: I think I should have mentioned, if both trucks reach an intersection,... (by BBrandon)
|
by Dorothy21548
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 solution to a series of complex linear equations without a u... |
Dec 18, 2020 at 9:45pm
[3 replies] Last: when I did controls algorithms, it was often, but not always, the case... (by jonnin)
|
by Fumagalli
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 input operations, the problem is that std::cin is a blocking i... |
Dec 18, 2020 at 4:32pm
[1 reply] : Standard streams are inherently blocking. If you need non-blocking con... (by helios)
|
by Yazz398
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 me? I believe the root of the problem is in line 150 but I ... |
Dec 18, 2020 at 12:59pm
[2 replies] Last: As you are using fixed size record file binary read/write for the clas... (by seeplus)
|
by keskiverto
Almost done random number generator. Help please
|
The OP post has been deleted. Quoted here: [quote=olorin82]Hi I can make the program generate random numbers but still it should the following: Create a lott... |
Dec 17, 2020 at 8:56pm
[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 then find out the index of that chosen element. I coded it in M... |
Dec 17, 2020 at 11:53am
[24 replies] Last: @Feit - done! (by seeplus)
|
by SirEnder125
Question about reinterpret_cast usage
|
Hello. I recently was wanting to std::cout a hex value to the console but it kept evaluating the hex to decimal (Understandable). So, I remembered not knowing... |
Dec 17, 2020 at 7:59am
[1 reply] : If you want hex, do this std::cout << std::hex << std::showbase << 0... (by salem c)
|
by SirEnder125
How can I read file at certain path?
|
[Closed by author] |
Dec 16, 2020 at 11:52pm
[6 replies] Last: Well, I am not actually making anything for windows. I am making a 3ds... (by SirEnder125)
|
by Jstar1990
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 i have so far. ]#pragma once #include<string> using n... |
Dec 16, 2020 at 11:35pm
[13 replies] Last: So fix it. You declared a bunch of functions but failed to implement t... (by jlb)
|
by L10nelMessi
Djikstra Algo Ouput Problem
|
Hi, I am currently doing a project on Graphs and its almost complete. Whenever i enter a char other than A it gives me errors. I still can't figure out what ca... |
Dec 16, 2020 at 5:35pm
[1 reply] : You can simplify some of the code: void printPath(int parent , int ... (by seeplus)
|
by gedamial
tellg() and get()
|
I have written a simple algorithm to read a text file backwards: int main() { ifstream file("myfile.txt"); if(!file.is_open()) { cerr <<... |
Dec 16, 2020 at 1:01pm
[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. #include <string> #include <iostream> #include <vector> #includ... |
Dec 16, 2020 at 12:15pm
[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 the program further so that it finds and extracts specified i... |
Dec 15, 2020 at 12:04pm
[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 UseCounter in my code below? Here's the task: Derive a cl... |
Dec 15, 2020 at 9:52am
[2 replies] Last: It worked perfect. Thanks! (by closed account j3wpz8AR)
|
by nanay001
Meaning of Arguments in Main Function
|
Hi, I have a question about a main function with the following arguments: int main(int argc, char *argv ) Let's say the above line comes from a source... |
Dec 15, 2020 at 7:12am
[2 replies] Last: https://www.gnu.org/software/libc/manual/html_node/Program-Arguments.h... (by keskiverto)
|
by ArturNoubel
[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 all files to work in C ++, everything is fine. I'm starting... |
Dec 15, 2020 at 12:49am
[1 reply] : show the code around line 61 of the offending file. its likely a ; p... (by jonnin)
|
by JUANDENT
const char[3] does not generate template parameter of char[3]!
|
The code: template<typename T1, typename T2> struct Pair1 { T1 first; T2 second; Pair1(const T1& x, const T2& y) : first{ x }, second{ y } {} }... |
Dec 14, 2020 at 7:42pm
[8 replies] Last: ok so the compiler is not giving very clear diagnostics! Thanks @Cubbi... (by JUANDENT)
|