General C++ Programming - May 2015 (Page 21)

by Lauke
Template Inheritance use case
 
Hi Guys i basically have template <unsigned int I> class Numeric { public: //stuff private: //stuff }; template <unsigned int N, unsigned int P> class ...
[2 replies] Last: Nutin is wrong. #include <iostream> template <unsigned int I> class... (by poteto)
Average score drop high and low
 
I need to write a program that asks for 5 test score, drops lowest and highest and finds the average. I have two errors in calcscore: findlowest identifier not ...
[2 replies] Last: Thank you so much. Stupid mistakes but I'm glad they were quick fixes. (by Mohawkuu)
Having a program use cerr when protocol is broken
 
I wrote a program that determines the range between two integers. I would like to set something up along the lines of cerr << "Either one or both of the numb...
[9 replies] Last: #include <iostream> #include <string> #include <sstream> #include <al... (by JLBorges)
by Gyiove
myclass m and operator * ( *m = value )
 
Hello everyone! I created my vector class: #pragma once #ifndef SPARKLYVECTOR_H #define SPARKLYVECTOR_H template <class T> class spvec { public: ...
[7 replies] Last: 'm not quite sure how to call those things or search. To be honest I'... (by Texan40)
by Kyi
Is there any genius who does self-code?
 
Hello, everyone! I am newbie to programming and as I study, I find it no that easy. At present I have neither teacher nor class even friends(not boasting actual...
[4 replies] Last: One advice I can give you is: - allways try to figure out why you ge... (by Gamer2015)
Number Analysis program
 
I'm trying to write a program that opens file , which contains a set of numbers. The program should then read the contents of the file into an array but it only...
[5 replies] Last: There is nothing wrong with your code. the first one. Just make sure t... (by N495t4r)
VideoClub
 
Hi guys, i have a project about a video club(add-remove-modify movies-series-games-clients,charge a client when he return a disc etc). Have anyone done somethin...
[2 replies] Last: Ok my friend there are some details: creat a new client, you need-> i... (by chris896)
Segmentation fault upon assigning value to 3rd matrix
 
// code 1 #include <iostream> 2 3 int main() 4 { 5 const int m = 1000; 6 int a ; 7 for (int i=0; i < m; i++) 8 for (...
[4 replies] Last: You are right Grey Wolf, the stack limit is 8192 KB. Thanks (by spskhokhar)
I need help making a memory matching game.
 
Have one Term describing category/theme you picked. This is the FACE term… Menu: Start Options • New Game Option • Exit Game Option Level of Play –...
[1 reply] : Please note, that this is not a homework site. We won't do your homewo... (by keskiverto)
Defining an array using classes.
 
I'm specifically trying to define an array in the header file. However since I want the user to define the array size, the size I want to define the array I wa...
[1 reply] : std::array can only have a fixed size known at compile time. Use std::... (by Peter87)
by dmngu9
vector subscript out of range pascal triangle
 
#include <iostream> #include <string> #include <stdio.h> #include <stdlib.h> #include <vector> using namespace std; int main(int argc, char *argv ) {...
[3 replies] Last: i make terrible rookie mistakes. This line is wrong if ((col = 0) || ... (by dmngu9)
File I/O (serialization) with character shift
 
My issue is that with my serialization set up the way it is, my fields are bleeding together so that when I read it in from the file into the class, I'm getting...
[2 replies] Last: *sigh* No. I want to replace. >.< (by ciphermagi)
Program is stopped
 
Hello everyone My program stops working when working in 'Adding an item'. Program stops working. Would someone help me with this please ? //*************...
[4 replies] Last: What cire is getting at is that dereferencing an empty pointer leads t... (by ciphermagi)
Binding a method of a template class
 
I've got a database with two types of items (ItemA and ItemB) stored in it. I want the database to perform a kind of operation on either ItemA or ItemB. The ope...
[1 reply] : http://en.cppreference.com/w/cpp/utility/functional/bind The argument... (by ne555)
Swap Function. Need Help!
 
Can anyone help me with what is the correct way to do this assignment? modify your three-number sort. Instead of comparing each number with the others, chang...
[1 reply] : template<typename T> void myswap(T& val1, T& val2) { T temp = val... (by TheKamis)
by Cooper
Virtual functions and class inheritance
 
Hello,I am making a project that has 5 different classes (given they are pretty small classes for the most part), one of which called Transaction that has a vir...
[1 reply] : Transaction should be an interface for Withdrawal and Deposit classes.... (by TheKamis)
C++11 Moving
 
Hey there, I think I understand rvalue references, moving and perfect forwarding quite good now and I ask this question just to make sure I'm not wrong. Are al...
[5 replies] Last: [quote=Disch]I understood that. But it doesn't change the fact that it... (by Gamer2015)
I need to load text files faster...
 
Hello, I have text files consisting of tens of millions or hundreds of millions of 4 column lines. I have a program that plots the data in the files, but loa...
[4 replies] Last: Take out the write operation and see how long it takes to run just rea... (by SamuelAdams)
by xpert
Access violation reading location 0xcccccccc
 
I am facing issue while executing C++ code. Following is the sample code: http::client client; http::client::request request(signed_URL); http::client::re...
[2 replies] Last: I have upload the complete solution (.sln). You can download the code ... (by xpert)
error C2143: syntax error : missing ';' before 'type'
 
Hi, I am new to programming C.. please tell me what is wrong with this program, and why I am getting this error: error C2143: syntax error : missing ';' before...
[1 reply] : What line is the error on? (by Disch)
May 2015 Pages: 1... 19202122
  Archived months: [apr2015] [jun2015]

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