Beginners - August 2017 (Page 3)

by Horki
CSV parser using STL
 
I'm wondering what would be the right way to parse CSV file with "numbers" using operator>> overload? test.csv Test,20,50.12 Other,31,46.12 code.cpp #i...
[2 replies] Last: Thank you Mr. @Duthomhas, - this is just one of the tasks in process o... (by Horki)
How to compute sum for user input
 
Hi everyone, I need your help by how do I construct the code for prompts the user to enter the start to end of the months and then invokes the compute function ...
[6 replies] Last: Hello Shyanie [for (int cols = from; cols <= to; cols++) { cout << ... (by Handy Andy)
by dubley
reversing selected elements of an array
 
In this code, the line: rev(&orr , numentries - 2); results in the first and last numbers in the array reversing and leaves the middle numbers untouched. Why ...
[3 replies] Last: Thanks very much. I didn't realise that after the first call the value... (by dubley)
Invalid operands of type double to binary 'operator-'
 
I have an error in function 'double sd1 (double, double)'. Can someone give me some advice? #include <iostream> #include <cmath> using namespace std; ...
[2 replies] Last: Oh I got it. It should be s1. Thanks (by thaooherb)
Multidimensional Array
 
I am required to write a program to generate a 5x6 array, elements of which must be equal to the sum of indices of the line and the column. That's not the wh...
[3 replies] Last: Nevermind, I added if between while x and z++ so that x comes back to ... (by arczi w)
Do I need to delete pointer arguments
 
I'm quite new to C++ so I'm sorry if this is quite a novice question but basically when I create a pointer argument like this: void Animation::Update(float*...
[5 replies] Last: Pointers are a mere implementation detail. The real question should b... (by keskiverto)
So, I start C++ at 0, and cannot seems to get code block to work
 
So I created a new project, and a typical "Hello World" pop up and I click run, it works. But, when I change the Hello world to something else, and hit build, a...
[3 replies] Last: Thank you. (by JinSherrry)
Calling Constructor without a pointer
 
How exactly do I call the constructor of a class without making it a pointer and using the new keyword? Am I unable to do this without making it a pointer?
[4 replies] Last: In the header, use a declaration: extern Animation animation; In... (by JLBorges)
Help with my do while loop
 
I am writing an application on the weekly income of a person and now it says that I also need to enter the yearly salary in my code. I am a very novice beginne...
[6 replies] Last: Thank you so very much kemort, I am ecstatic about this program. I j... (by Jdawg32)
Program crashing while using destructor
 
Hello, I wrote a code but it's crashing when i am using the DESTRUCTOR . Please help me fixing this :3 My Program has : 1.header file 2.main program 3.h...
[6 replies] Last: you shill have the memory leaks, and need to guard against self-assign... (by ne555)
const function what for?
 
What's the purpose of adding const to a function? const_iterator begin() const { return data; } I'm returning data so what's the difference if I ommit c...
[3 replies] Last: This is const-correct: struct A { using iterator = int* ; usi... (by JLBorges)
by Enaris
Lambda value of variable caught by reference before and after call
 
I was doing exercise: Write a lambda that captures a local int variable and decrements that variable until it reaches 0. Once the variable is 0 additional c...
[3 replies] Last: Thank you, I will renember that. (by Enaris)
Math help needed for a beginner?
 
Hi everyone. This is a homework assignment where we gotta show if a student's score pass or failed. Everything operates how I want it too EXCEPT for the math bi...
[8 replies] Last: One can stay in integer math in some cases: #include <iostream> int ... (by keskiverto)
by ztdep
Split view in console
 
Dear friends: I want to show different interface in the split view of console window, how to set it. Regards
[5 replies] Last: NCurses was created for *nixen. Type 'man ncurses' at the shell prompt... (by Duthomhas)
undefined reference to 'Winmain@16' and ld returned l exit status
 
I am trying to run following code in Code blocks and getting errors 'undefined reference to Winmain@16' and 'ld returned l exit status' when I build it. ...
[4 replies] Last: Oh yes, you are right! Got it now. Thanks! :-) (by pmusale)
Variable int Output failure
 
I'm an absolute begginer to coding, I've wanted to learn C++ for a few years and like the idea of creating something thats mine and mine alone, so I bought a bo...
[2 replies] Last: I swear it's always the simplest things, like forgetting that damn ; ... (by Digital Brain)
I'm having trouble installing adobe asl c++.
 
Hello I tried installing adobe asl into codelight. I put ".a; .dll; .so" into the "Library Search Path". I put "path\asl_1.0.35_begin_win" in Libraries. I put "...
[no replies]
by aedt
Function that returns a pointer to another function
 
Can any kind fellow explain me fp11() and fp03 functions step by step? The resource I have been learning C++ from does not mention such language construct. And ...
[8 replies] Last: I had made a silly mistake in writing the test function; it should hav... (by JLBorges)
notify from a private vector of objects
 
I have a class , "request", which has a vector of "exector" objects. Each executor object executes something asynchronously. How can I find out if at least one...
[4 replies] Last: I never realised that a timeout of zero enables one to check if a std... (by bluefrog)
writing a code for console that analyzes binary
 
So, I am trying to write a c++ code that asks for a binary number and then after you can input the number you are looking for (IE 6125) and if it finds it insid...
[7 replies] Last: I got it to work finally for some reason I just had to change my compi... (by clschneider1990)
August 2017 Pages: 12345... 17
  Archived months: [jul2017] [sep2017]

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