General C++ Programming - April 2017 (Page 9)

Random Generator
 
Hey guys, I'm writing a program that generates a random number. I have to find 6 random numbers (1-6) at least once and then terminate the loop when they have e...
[2 replies] Last: Thanks a lot, this helped fixed my problem (by PhilippeJ)
Sortable<Iterator<T>> dummy implementation
 
I am writing a template function sort<Cont> to sort a Container type Cont: template<typename Cont> void sort(Cont& c) { /// ... static_assert(...
[4 replies] Last: > if the call is syntactically correct, the 2 type functions must be o... (by JLBorges)
template alias error
 
I have written the following code: template<typename Val> struct Forward { /// ... }; template<typename Val> using Value_type<Forward<Val>> = V...
[2 replies] Last: clang gives a more sensible message: "error: partial specialization of... (by Cubbi)
Code Review: Time based notification program
 
I wrote a program that sends notifications on my computer (Linux (Debian Jessie 8.7 LXDE)) when the time comes. A file contains all the information about the ev...
[14 replies] Last: @JLBorges Alright, I think I went too far into splitting my code into ... (by boost lexical cast)
by Kalcor
Digit sums problem
 
Hello, I was solving a problem that is as follows: When Grace was in third grade, her elementary school teacher assigned her the following problem: What is th...
[1 reply] : Hey I got your program working properly with 0's with just one minor ... (by keineahnung)
by Kalcor
Arrays
 
Hello, If I have an int array with elements {1,2,3,4} and I do not want to add the ints inside it but instead I want to have an int variable that holds the fir...
[6 replies] Last: Thanks for all the replies, managed to reach it in sort of another dir... (by Kalcor)
URGENT HELP! Car Structure Program
 
I have to ask user to input information on a car such as make, model, year, etc. After that, I need to display the user input AND display three more already ini...
[1 reply] : My problem is that my program is asking multiple times instead of jus... (by Thomas1965)
Tic Tac Toe project
 
Me and my partner have to create a Tic Tac Toe game for our project. I was wondering if anyone could look at the code for me and help me figure out the errors? ...
[10 replies] Last: An improvement to the AI without too much trouble would be for the AI ... (by closed account 48T7M4Gy)
C2678 binary '<': no operator found which takes a left-hand operand of type 'const node'
 
Hello, I am trying to fix my program, but i keep getting the error in the title. This is the entire error. Severity Code Description Project File Line Sup...
[2 replies] Last: wow thank you! (by gogobumrush)
Need help getting started! What should I do first?
 
Create a program to use the Car structure. The structure Car is declared as follows: struct Car { string carMake; string carModel; int yearModel; ...
[6 replies] Last: How did the assignment go? Still need help? (by Beyond Humanity)
Hash Table with Chaining Assistance
 
I made a similar post to other sites, but did not really get any help, so I added more info and coded more of my own functions. I was given an assignment in whi...
[6 replies] Last: you can make, in crude terms.. linked_list_class hashtable ; hashta... (by jonnin)
void pointer usage
 
I realize that void pointers should be used as a last resort but the need arose and I can't figure out what's wrong. I have an object class foo { public :...
[8 replies] Last: void* means it can be of any type you choose. You can read about it fr... (by benhart)
by RNBW
Analyse a beam (1,2,3)
 
I’m not sure which section I should put this in. I’m just starting to learn C++ after many years of using various BASIC languages. I have often looked at ...
[43 replies] Last: @lastchance I won't hold it against you! It's been an interesting disc... (by RNBW)
oop
 
Can anyone please help me with this program ? The Question is: "Write an oop program that adds two distances(a distance should have parameters of kilometer an...
[1 reply] : Can anyone please help me with this program ? afraid not, you have t... (by gunnerfunner)
Exception when delay loading of binaries fail
 
Hi, My program (myApp.exe) delay loads a dll (TestDLL.dll). I am doing a negative test, where I deliberately deleted TestDLL from its location. So when the pro...
[1 reply] : What does your destructor do ? (by Thomas1965)
Please Help me
 
when i'am make a script for input and out file with code : #include<iostream> #include<fstream> #include<stdio.h> #include<string.h> using namespace std; ...
[2 replies] Last: sample on file "work" there are numbers 1,3,4,5 when I input a lot of ... (by MMaisztre)
Question about Accessors and mutators (edited)
 
I am writing a horse race game. I have done a lot of research on accessors and mutators, and I am still confused why I am not getting a number other than the va...
[11 replies] Last: Will take a look at my code and determine my problem and get back to a... (by james42)
its about the lists sorted or unsorted
 
list.cpp #include "list.h" #include<iostream> using namespace std; int list::length()const { return length; } bool list::isfull()const { ...
[no replies]
i
 
hi! i am
[5 replies] Last: Though wouldn't you normally use !file.is_open() to check if a file ... (by Thomas1965)
How can I know which iterator type I am using?
 
Reading the textbook of C++, I know that there are 5 iterator types (input, output, forward, bidirection, and random) in STL. How can I know which type I am usi...
[3 replies] Last: Apologies in advance as I've not 100% understand the above solution (... (by gunnerfunner)
April 2017 Pages: 1... 7891011... 16
  Archived months: [mar2017] [may2017]

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