General C++ Programming - August 2014 (Page 19)

class 'A' is no direct base of class 'B'
 
I have something like this class A{//interface}; //implementation class B{//interface includes a member of type 'A'}; //in implementation of Class 'B' const...
[2 replies] Last: Oh! what the socket, I'm too stupid, I was using 'A' the class name in... (by danicpp)
logic behind initializer list
 
Well if I have code like class a{//interface}; //implementation for class "a" class b{//interface has a member of type "a"}; //implementation constructor ...
[4 replies] Last: Oh yess!!! this makes sense like B::B(){ aobj.somework(); } ... (by danicpp)
Question: constructor in constructor question (heap vs stack)
 
Hi guys, I have a questions that's been bothering me for some time. Here's the scenario... class Record{ public: Record():number(0){} Record(int ...
[3 replies] Last: Thanks guys, that anwsered my question (by toomanystars)
by bw119
Functions and ofstream
 
I have one function(s) that's purpose is to write back some information onto a file, and also in my main function, I also have to write back some information to...
[1 reply] : Instead of creating a new ofstream in function1(), it needs to use the... (by Chervil)
How to link a Switch statement to a if/else.
 
Hello, I'm just a newbie to programming, could you help me solve this problem of mine. The sample output of this program would be: Please select: 1 - Year 2 - D...
[1 reply] : scanf("%d", &x, &y, &d, &m); This will never change y, d, or m becau... (by dhayden)
static variable initialization problem
 
When I try to initialize static variable from within the constructor the compiler exits and return exit status 1, Can't we initialize static variables from c...
[2 replies] Last: Thankyou kbw, I got it constructor could do with static member too but... (by danicpp)
by fi50
SDL Animation
 
I'm not really sure if this is the right place to post a question like this, although the question itself is really more of a maths thing and I couldn't find an...
[4 replies] Last: Ah. Thanks for your time mate. You've been a great help. :) (by fi50)
Range based for loops
 
Can anybody explain Range based for loops ?
[7 replies] Last: It's a bit inconsistent compared to the rest of the tutorial code. (by Peter87)
by bw119
Problem with functions in classes
 
Hi, this is my code #include <iostream> #include <vector> #include <cstring> using namespace std; class student{ public: private: string name; vec...
[2 replies] Last: Thank you so much. You are a life saver! (by bw119)
Struggling with Vertex Shaders
 
I am learning to render objects with vertex shaders after just getting the hang of rendering objects with the fixed pipeline. I successfully have been able to r...
[1 reply] : I figured out how to translate the rendered objects with a shader thro... (by jheard901)
please help
 
I cant figure out why my program goes into an infinite loop when i exit my entries. // LinkedListData - store data in a linked list of objects #include <...
[1 reply] : for(NameDataSet *pIter = pHead; pIter; pIter -> pNext) Did you mean p... (by helios)
How to output console display to a txt.file?
 
Hello people! i am currently doing a complex number calculator ,and i wish to output my data to a txt.file .Can anyone help me cause i tried fstream and it does...
[6 replies] Last: JLBorges redefines what std::cout does. Other code does not need chang... (by keskiverto)
generic linkedlist in c
 
I am currently learning the C programming language, and I decided to implement several data structures in order to help learn the language. However, I am stuck ...
[1 reply] : I found the correct solution to the problem. Upon creation of the lin... (by haglerchristopher)
Function matching and Argument-dependent lookup
 
#include <iostream> #include <string> std::ostream& operator<<(std::ostream& os, const std::string& str) { os << '['; std::operator<<(os, str); ...
[3 replies] Last: The declaration shown in the link you provided is a simplification. Y... (by cire)
Why is the exception?
 
Hello. All I know in that I get an exception. I don't know the reason.Here is my code snippet: int iteration=0; stopWord = strtok(stpWords, "\n"); ...
[1 reply] : If you run this from a debugger and reproduce the exception, the debug... (by Disch)
Input does not enter buffer when sleeping
 
When the program is processing/sleeping, those char input at that time would not goes into the buffer until the next input request (such as calling istream::ge...
[3 replies] Last: C++ streams do not have time stamps. What are time stamps? Does othe... (by Nikko YL)
by piotr5
when is no constructor being called in new standards?
 
I made a simple experiment using: struct B : Moveable<B>{//has verbose copy and move constructor int val; B():val(0){Cout()<<"def ";} B(B &&n):val(n.val...
[4 replies] Last: c3br returns copy_elision somehow, in addition to one copying. Whic... (by Cubbi)
by Serker
Help a Beginner!
 
Hey I use C++ in "Microsoft Visual Studio 2013". I enter two numbers. I wanna sum and multiply this two numbers. Where is the problem? My code: #incl...
[3 replies] Last: I am also a beginner and i got an assignment to create a program that ... (by ramotnarg)
destructor is at war with cascading of stream insertion operator
 
I have this code: #include <iostream> #include <string.h> #include <iomanip> using namespace std; class test{ private: int i; char * c; public...
[2 replies] Last: Oh Wolf how thankful I am to you!!! thankyou very much. (by danicpp)
make dependency and Makefile
 
Hello. Please explain to me what is dependency in Makefile. secondly I have made Makefile but cannot use make -f . How to use it? Third what is make T...
[4 replies] Last: Yes (by kbw)
August 2014 Pages: 1... 1718192021... 25
  Archived months: [jul2014] [sep2014]

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