General C++ Programming - November 2018 (Page 6)

logic.
 
Im actually just trying to understand the logic behind why does variable "Value" not counting properly integers>=15. if really appreciate it someone can help me...
[5 replies] Last: No no it's not even 0.1% your fault.. it's because he didn't use codin... (by Satan)
Conversion for functional-style cast from node* to iterator
 
Wondering if there's a way to convert node* to a iterator for a linked list #include <initializer_list> #include <iostream> template <typename T> class List...
[1 reply] : Why can't you just add a constructor on line 83 [code firstline=83]exp... (by mbozzi)
unary operator overloading using non member non friend function
 
can anyone help me how to do unary operator overloading using non member non friend function?
[1 reply] : There's multiple unary operators in C++, each with different technique... (by Ganado)
by skink
Looking for valarray performance benchmarks
 
Valarray was supposed to be the next big thing in C++ speed, but that was years ago. I wanted to see whether using gslice with valarray would work as fast as a ...
[no replies]
by laedus
To curry or not to curry
 
Hello, Has somebody already implemented these functions ? template <typename X, typename A, typename B> function<function<B(A)>(X)> curryfy (function<B(X,A)>...
[7 replies] Last: I remembered that C++17 provides std::apply , so here's a version of ... (by mbozzi)
by d0253
Rule of three memory leaks
 
==901== Invalid free() / delete / delete / realloc() ==901== at 0x4C3029C: operator delete(void*) (vg_replace_malloc.c:576) ==901== by 0x400FDE: Grocer...
[6 replies] Last: for the assignment operator use the copy-and-swap idiom Grocery& Groc... (by ne555)
Basic image processing
 
Hello again, I wonder if you can help me and see if I am on the right track. We have an assignment for basic image processing, I understand about coursework...
[15 replies] Last: Cheers, I've worked out the border thing too. (by Vostok17)
Removing punctuation from start and end of string
 
I would like to remove the punctuation at the start of a string and at the end. My code so far: string remPunc(string &word) { for(int i = 0; i < word.l...
[9 replies] Last: This defaults to whitespace trimming* but you can give it a string of ... (by closed account z05DSL3A)
TicTacToe Project
 
Hello, I am working on a project for my programming course and am struggling to get started. Here are the instructions for the project. If anyone could be of so...
[1 reply] : to get started, organize the requirements by what you can do and when.... (by jonnin)
A program for determine the largest and second largest value from entered integer
 
#include <iostream> using namespace std; int Largest(int ArrayFill , int x); int SecondLargest(int ArrayFill , int y, int z); int main() { const in...
[2 replies] Last: What should SecondLargest() do if there are two instances of the large... (by dhayden)
Add sum of rows and colums for array
 
I have an array that prints out, but I need to calculate the rows and columns using a for loop but unsure of how to actually go about it. using namespace ...
[10 replies] Last: If you don't initialise it to 0 then the behaviour is "undefined" and ... (by lastchance)
segmentation fault 11
 
Hi im getting segmentation fault 11 if I delete the NULL pointer from a link list what would I return if the list is empty? #include <cstddef> #include <...
[7 replies] Last: Are you still using the same main() program in your original post? Tha... (by dhayden)
Strange shuffle() behavior
 
Perhaps I just don't understand what shuffle() is supposed to do. I read the reference on this site thinking it would have the same behavior as random_shuffle()...
[6 replies] Last: > JLBorges, does your code create a new rng seeded with a true random ... (by JLBorges)
by alreem
if statement
 
HELP me please to solve this problem using if statement Write a C++ programme that reads a sequence of integers terminated by zero value then finds the perce...
[3 replies] Last: > Enter a sequence of in integers terminated by zero > 6 -7 -8 10 -12 ... (by ne555)
[Help] Matrix with undetermined dimension
 
I tried to write a program which can perform matrix multiplication with undetermined dimensional matrix (the dimensional of matrix will be read from input file)...
[10 replies] Last: Very clean-looking and concise. I can see why people like it. (by tpb)
Validate input data from user in a Class
 
Im trying to make this work, main is going to be a menu with more options but to make it shorter i have cut that part, it seems its going through like it load a...
[8 replies] Last: Thank you so much, i need it to validate numeric input but i just have... (by contredb)
by S04
Can someone help me start this program, completely new to c++ and no idea what I need to do.
 
Thanks to their innovative suits, human cannonballs can fly without air resistance, and thus their trajectory can be modeled using the following 𝑥(𝑡) =...
[1 reply] : You need to read and show something. See http://www.cplusplus.com/doc/... (by keskiverto)
Sharing software
 
Over the summer I created a program that I think some people might enjoy. I want to share it under creative commons for free, but I'm not sure the best way to d...
[2 replies] Last: Edit: link removed Is this what you are looking for? (by Atilliar)
advice(I guess)
 
Hi guys, so I seen a challenge online and it looked like a challenge I could get done in 30 minutes to an hour but clearly not :( I made a hangman program...
[8 replies] Last: I removed the constexpr, I like your program it's clean very presentab... (by adam2016)
November 2018 Pages: 1... 45678... 12
  Archived months: [oct2018] [dec2018]

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