General C++ Programming - February 2018 (Page 2)

........
 
......
[4 replies] Last: @macXnXcheese117 Please DON'T delete your posts after you've got your... (by MikeyBoy)
Help with family tree program
 
Hi there, I'm still working on the same family tree program, but I'm having trouble with implementin...
[15 replies] Last: I don't think it would be easy for the function displayWifeChildren (w... (by CPPAWhile)
Text based game assignment where I randomly assign objects into an array
 
Hello fellow programmers, I have to place weapons/enemies in random spots in a map and they cannot b...
[4 replies] Last: Thanks for the information! I'm not quite sure why but when I run it I... (by mikenaria)
Help returning a instance out of scope!
 
I am currently writing a custom string class that uses cstring to store the data. On top of that, I ...
[2 replies] Last: delete tempStr.str; tempStr.str = new char[tempStr.cap]; If that ne... (by mbozzi)
Help with recursion sum
 
The sum of {1,2,3,4,5,6,7,8,9} should be 45. Sum is displaying 45. Binary Sum is only displaying 36....
[3 replies] Last: [quote=waranthem]What exactly does n-n/2 do? Basically, n/2 will suff... (by lastchance)
Why Shortest path code not calculating distance to node 6?
 
I have tried code for using Dijkstra's shortest path alg: https://codepad.remoteinterview.io/DOS...
[2 replies] Last: I guess because it was late and I was tired and for some reason just p... (by sonar87)
Problem with Vector of vectors
 
I'm trying to create a grid by user defined parameters, I've done this by creating a vector of int v...
[2 replies] Last: Thank you, i believe i may have it figured out now. I had a few syntax... (by chronasiton)
by Jmac21
Help With program using fork() system for child and parent process
 
This is the orginal question and My code Write a C/C++ program using fork() system call that allo...
[2 replies] Last: #include <stdio.h> #include<stdlib.h> #include <unistd.h> #includ... (by Jmac21)
Adding the sum of the previous value, and continuing from there.
 
I'm trying to write a code where it should add on from the current information. For example, let's s...
[2 replies] Last: I tried looking around and trying different things but it wouldn't wor... (by jolamiii)
Help with this program?
 
A society keeps a list of members and uses a program to store the list.For each member, the followin...
[6 replies] Last: I have to use arrays and there is no sort function for arrays. How... (by Repeater)
deleting primitive and class types pointers.
 
#include<iostream> #include<string> class A { public: A() { std::cout << "constructed...
[1 reply] : What makes you think the int value isn't being deleted? What are you e... (by Repeater)
Help with piping in c++
 
I am currently trying to make a functional shell within c++ using pipes, forks, and execvp. Currentl...
[1 reply] : Unix: pipe() https://www.freebsd.org/cgi/man.cgi?query=pipe&apropos=... (by JLBorges)
by sb99
How are these ints uninitialized?
 
So, bear in mind I am a beginner so I am not to worried about the layout as of right now. Everything...
[4 replies] Last: Ah I found the problem, it was so obvious lol. int points was calling ... (by sb99)
crashed during printing string reference.
 
#include<iostream> #include<string> const std::string& test() { return "sandeep poudel"; ...
[4 replies] Last: std::string const& test() { static std::string name{ "Sandeep Poude... (by mbozzi)
Implement customer unique pointer
 
I am writing unique pointer implementation for Arduino platform. template<typename T> class Poin...
[1 reply] : Both number1 and number2 have the same problem. They are dangling poin... (by Peter87)
Write an algorithm that takes three integers and returns the smallest integer that is a multiple of all three integers.
 
//author Abdullahjan #include<iostream> using namespace std; int main(){ int i,min,a ; int...
[1 reply] : You are being asked to compute the Least Common Multiple. https://www.... (by Duthomhas)
by abc1
Time complexity O(nlogn)
 
Which of the following sorting algorithms yield approximately the same worst-case and average case ...
[1 reply] : http://bigocheatsheet.com/ At least (B) is correct, because both heap... (by Ganado)
by helios
Cost of unnecessary virtual inheritance
 
Is there any time or space penalty from inheriting virtually when not needed? For example, consider ...
[4 replies] Last: Darn. Thanks. (by helios)
Prevent pointer from modification.
 
How can I prevent a pointer variable from modification. I want to be able to modify and object tha...
[1 reply] : I want to disable ability to change pointer but allow to change the a... (by Ganado)
by Thesar
Overloading of dereferencer and node iterator
 
I am creating a queue, and i have some overloading i need to get working. I start with my two class...
[3 replies] Last: I got it working woth the <> button, thank you. What it the differenc... (by Thesar)
February 2018 Pages: 1234... 11
  Archived months: [jan2018] [mar2018]

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