Beginners - April 2019

by vysero
How to read/understand this line of code.
 
Here is the program and the line I am wondering about is line 51: #include <algorithm> #include <iomanip> #include <iostream> #include <ios> #include <stri...
[2 replies] Last: Line 51 can translate to an if/else construct: [code firstline=51] i... (by George P)
by Fonzeh
RDS(Random Drug Screen) Random Name Picker
 
So I was asked at work if I could come up with a way to pick a random name from a list for Random Screening at where I work. The guidelines are like this. Th...
[5 replies] Last: Hey this is good. So I was thinking everytime the Application was lau... (by Fonzeh)
by Jo1152
File reading help
 
I am trying to create a program that reads from a file, record data from the file, and write to a new file with all the information on it. At the moment, I am t...
[2 replies] Last: Sad to say, but that really didn't help me very much. It still doesn't... (by Jo1152)
by bsr
adding string
 
I want to sum two big integers, and I wrote a code but this code is not working. Can you help me? #include <iostream> #include <vector> #include <string> #...
[2 replies] Last: Thank you, for your answer. (by bsr)
MSV Find where a given function used
 
I have a source code of a program and I am trying to learn from it by analizing the code. I am looking for a method to find all codes where a given defined func...
[1 reply] : Which version of Visual Studio are you using? The feature works for... (by George P)
C++ OOP returning several different values
 
Hi all, Sorry if my title is a bit misleading, not sure how to summarize the issue Im having at this point. Basically my assignment is to use Inheritances. But...
[3 replies] Last: Usually in such a case it is a good idea to pack things in structs lik... (by coder777)
Access violation?
 
So I am trying to write a program with structs, function prototypes, references, pointers (for school). I am able to execute this program, but after running...
[7 replies] Last: thx (by olybobo)
help with
 
i keep getting an output that says the exit code is zero. I don't know if im doing it correctly. the question is: 1. Implement a recursive method fibo that...
[5 replies] Last: I fixed the function corner and it is running the code. thank you (by tori1523)
Array problem between 2 class
 
Hello there ! I am trying to write values into arrays with a method add_general_noise() which generates an int random value and writes it into arrays. Th...
[7 replies] Last: saxoalex, Qt has a tool to easily update all its components, compiler ... (by Enoizat)
Understanding binary search trees
 
Hi everyone, I have recently seen binary search trees and I'm trying to understand how its code works and how to implement it myself. The code below is the e...
[5 replies] Last: [quote=jefazo92]I don't understand your answer to the 2nd question. As... (by MikeyBoy)
by ROKeb
How to delete pointer memory of std::deque or something
 
Hi. I am creating MFC Program in Visual Stduio 2010. I want to use std::deque and input Parent Class Pointer in container. so, I declared variable as follows ...
[2 replies] Last: Repeater’s already given you the proper answer to your question (“... (by Enoizat)
by Pecvx
about stringstream, reading from file
 
Hi, I want to read data from a file and store them in two variables, and I wondered if it was actually necessary to use stringstream in this case. (can't tes...
[6 replies] Last: If your file has two comma separated strings in each line, perhaps you... (by Enoizat)
const auto& for loop
 
Hello, in which cases is it necessary to use a for loop on the form for(const auto &i : vec){ std::cout << i << std::endl; } rather than on the form ...
[2 replies] Last: If you want to change the values in the container, reference is necess... (by Repeater)
by Yogib
(getline(infile, data)) help ignoring line breaks
 
im trying to reformat the address information given to me in a text file. that part i can do, but i need to know how to get my program to ignore the line breaks...
[1 reply] : Hello Yogib, I can see several problems: Line 34. If your compiler i... (by Handy Andy)
How can I implement an abstraction into this code? 2.0
 
Asking this question again since I didn't get any responses. I need to input an abstraction in this code but it really doesn't need it and its too late to chang...
[4 replies] Last: Write your program using a class. Have class called Bank and have func... (by fiji885)
Need help with the menu loop and a function
 
I'm writing a phone book application, and I am having trouble looping the main menu here. When I go to select 1,2,3,4 it is just looping the initial cout state...
[3 replies] Last: Now when I go to add the contact it errors up, has something to do wit... (by PistolPete10)
by cutwo
need help with Minimum spanning
 
Need help fixing code #include <iostream> #include <string> using namespace std; struct node { int source, dest, cost; }n ; int c = 0, tempnod...
[2 replies] Last: Need help fixing code The compiler you use compiles this code without... (by MikeStgt)
by ECito
Omitting pyramid pattern rows
 
Good afternoon all! I'm requesting an integer and using the same integer to print a pyramid pattern using nested loops. However i'm also trying to omit the requ...
[10 replies] Last: intentionally In that case I withdraw my remarks :) (by MikeStgt)
Overloaded ostream operator
 
Why can't the overloaded << operator be a member function of a class? I've looked around, but didn't find any clear answer. I've found that "operator << takes i...
[1 reply] : You can overload the << operator be a member function of a class. BUT ... (by Ganado)
Retrieving and referencing names stored in a vector
 
Over the past couple months now I have been working on independent small projects and working my way through an old textbook from 90's. I've had some great advi...
[5 replies] Last: Once again, thank you. Yeah that makes complete sense. Thank you for... (by everybodyCallsMeM)
April 2019 Pages: 123... 24
  Archived months: [mar2019] [may2019]

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