Beginners - January 2020 (Page 11)

help with "aborted (core dumped error)" when trying to convert strings to doubles
 
I have a .txt file where I have to extract just the fifth column and save it in a vector as doubles. This is a sample of the data: Date,Open,High,Low,Close,V...
[3 replies] Last: If you have UNIX tools available, just extract the 5th column from the... (by dhayden)
The while loop in my class won’t close.
 
I’m writing a program to try and use everything I’ve learned and basically see if I can explain it as well. The only problem is that when it comes to this c...
[2 replies] Last: Thanks I tried replacing the cin >> with the getline. But right after ... (by Kingcheol11)
by asxxx
Travelling salesman problem (1,2)
 
Hi, I want to solve salesman problem using brute force but choosing random numbers of roads. It is random method ? So I created table with number of points ...
[24 replies] Last: Er, the very first thing you should do with every point you get is ins... (by Duthomhas)
Browse a tree
 
Hello first sorry for my english I'm French ! I have a question I want to store values of my tree in a table in ascending order but first I just want to stor...
[13 replies] Last: say carefully what it is you want to do, exactly. you can search a so... (by jonnin)
Basic "String" data type not functional
 
Hello, can you please help me understand what is wrong here? Goal is to print value of integer i. In case i is a multiple of 3, then print word "Fizz". I am g...
[2 replies] Last: Thank you. Somehow the online compiler I am using was suggesting 'Stri... (by mrpear2020)
Zorder of overlapping rectangles
 
I am drawing some simple rectangles. One overlaps the other slightly to create a shadow effect. Top rectangle is dark gray and shadow is black I can't figure ou...
[3 replies] Last: Visual Studio 2019 This is what I have added to a basic Visual Studio... (by jvallee)
by chipp
reinterpret_cast return value
 
i wanna ask, from this web https://www.geeksforgeeks.org/reinterpret_cast-in-c-type-casting-operators/ it says: It doesn’t have any return type but,...
[4 replies] Last: ok, thanks guys... so glad i asked you guys... (by chipp)
pascal triangle
 
Write your question here. #include <stdio.h> #include <limits.h> #include <iostream> #include <string> #include <algorithm> #include <vector> us...
[2 replies] Last: @Ganado thankyou for the help!!! (by surfersss)
program assigns blanks to array instead of *
 
Hi, I'm working on a small program for practice but I've hit a wall. It's a little card matching game (i've seen over a dozen posts asking for help on this ex...
[4 replies] Last: No worries buddy, hope this helped, good luck with your program :-) (by H00G0)
Remainder Code
 
Hello! Okay so here is my code, everything is working dine except the while loop. The purpose of this program is to input a number "40235" and then dividing it...
[8 replies] Last: ... and with a small tidy up and code tags we get ... #include <iost... (by againtry)
Overloading << for template problem
 
Hi, I have a problem with my code. I have template and Im using it for a wchar_t T parameter. template <class T> class ValueTemplate { public: T value;...
[3 replies] Last: #include <iostream> template <class T> class ValueTemplate { T ... (by dutch)
Linked list movies
 
My current code is where I enter in how many movies there (integer "max") are and enter in the names of said movies. After that I've been trying to ask the tick...
[4 replies] Last: I see...Thanks for the constructive criticism. I'm currently creating ... (by Deadweight77)
i can't see anything while doing typecasting
 
I want to see typecasting pointer. So i write this program but the output is: size of integer is: 4 address: 0053FC20, value: 2025 size of integer is: 1 a...
[4 replies] Last: the address is what it is, regardless of how you type it, by the way. ... (by jonnin)
function alias for functions of multiple variables
 
Can function aliases be made for functions with more than one argument? There's this function call ImGui::Begin("text") that I'd like to turn into somethin...
[3 replies] Last: ... (by Enoizat)
Boost vector and matrix multiplication:
 
This is a sample program for multiplying matrix to vector using boost.Am not able to understand why i am getting this error.Can anyone help me understand what i...
[2 replies] Last: The following "works" in cpp.sh anyway. For the boost version in cpp.... (by lastchance)
[Error] expected unqualified-id before '{' token
 
what am i doing wrong here what does the program needs #include<iostream> #include<cstdlib> #include<cstdio> using namespace std ; int main() { int...
[2 replies] Last: Intuitive indentation and exact error messages. #include<iostream> i... (by keskiverto)
understanding problem
 
i have the following code, ignore the language, but after running it it just shows me press 1 to continue and it doesnt what is supposed to do, can you point me...
[2 replies] Last: It's hard to know what's wrong when you haven't said what the right be... (by dhayden)
Quiz in c++
 
So i have a project with a quiz, and i had it to present it to my teacher, i did it, it worked but the teacher wasn't happy because he said that the code was to...
[3 replies] Last: You will need to define the format of your input file. Here's one pos... (by dhayden)
Use Of ||(OR) In While Loop___What Should Be The Right Code
 
So I Have Written A Code That Should Accept A Specific Words Only, but The while Loop Is Not Working What's Wrong In This Code #include<iostream> #inclu...
[4 replies] Last: #include <iostream> #include <string> #include <map> #include <algori... (by Ganado)
by hbcpp
Adding objects to 2D Vector
 
I want to make a matrix using vector and instead of int I use obejects of the class Fraction However, I am trying to add elements to it but with no luck so ...
[4 replies] Last: Found the solution after posting the problem on stackOverflow https://... (by hbcpp)
January 2020 Pages: 1... 9101112
  Archived months: [dec2019] [feb2020]

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