Beginners - January 2014 (Page 11)

Using Constructor from a Base Class
 
Hello, I am doing a program that requires me to use the base constructor of a class when instantiating the derived class and just cannot get a hold on this. Ple...
[3 replies] Last: The derived constructor needs to have enough arguments to call the par... (by kevinkjt2000)
Outputting a map
 
So I'm trying to create a program that reads in a list of words and then reads in a document and compares that document to the list of words and if a word from ...
[8 replies] Last: #include <iostream> #include <string> #include <sstream> #include <se... (by JLBorges)
Undefined reference to Class::Function error
 
I've been following TheNewBoston's C++ tutorials and it went just fine until I got to placing classes in different files. I've followed the video to the letter ...
[14 replies] Last: It works! Thank you so much! It frickin' works! Ha ha! Oh my God, I sp... (by Althalus99)
by engr
Volume of Rectangular problem
 
IN the following code i have taken input and after that i will take the same number of length,width and height of rectangular. But If I take n=3 then the number...
[13 replies] Last: that's C code.. (by engr)
Help with passing a refernce of array
 
I am working on some code for a class and I would like to pass an array as a reference. I want the array values available to the function. Any help would be gre...
[6 replies] Last: I changed the code by removing the address of key word "&" but now I g... (by bpedigo)
Functions and I/O Files
 
I am working on an assignment that must read input from a file, but as per my instructor's directions, "Make sure you use functions, a function for each of the ...
[9 replies] Last: I think the reason for the last set of data not being printed is a sid... (by Chervil)
Trying to understand C++ if syntax
 
I've done some courses in Visual Basic and a lot more in Java. Now I've just begun learning C++, except this time I'm teaching myself. I've run in a snag with t...
[7 replies] Last: Yes I am (missing another equals sign that is) :) And if it does work,... (by Straikkeri)
by wolfv
How to initialize static stack?
 
Please help. I searched for examples and found none. I need to initialize a static stack by pushing the first node onto the stack. Is there a way to do that? ...
[3 replies] Last: Hi shadow fiend. Why would you want it to be static ? To share one... (by wolfv)
by omoe
Best cplusplus books on process memory?
 
Hello , So i wanna learn more about process and memory related c++ functions such as OpenProcess , VirtualQueryEx , ReadProcses , WriteProcess , But i didn't fi...
[1 reply] : Did you try Google? These are Windows functions. You can find docu... (by AbstractionAnon)
Class with same type member object
 
Hi, I have the following class: #ifndef NODE_H #define NODE_H #include <iostream> class Node { private: Node leftChild; Node rightChi...
[5 replies] Last: Ah wait of course I understand now! Thank you very much! (by MrProgrammer)
Problem with returning values
 
Hello! As im learning cpp I'm doing some exercises and I stumbled on a problem can I retrun only one value not changing other values and if I can how can I do ...
[7 replies] Last: yes i am (by closed account iAk3T05o)
GetKey function
 
Ok i updated my original getkey function. Now it returns ascii if you press a character and virtualkeycode if you press something else; Examples coming soon ! H...
[3 replies] Last: Ok i updated it also added examples. (by SorinAlex)
Parsing strings
 
Hi, There's a file with students' first name, last name and grades, i.e.: [grades.txt] johnny ray 79 43 23 32 99 lone ranger 54 88 78 94 34 alpha beta...
[3 replies] Last: You are correct the operator >> reads until it hits a whitespace , and... (by giblit)
by engr
C++ Graphics
 
I want to do program which has graphical interfaces like the background color. image installed. and so on.. but i can't find any topic on the net regarding it...
[2 replies] Last: <allegro.h> is also a good graphic library usually used to develop 2D ... (by Atyab)
by Sam99
Stack problem(member functios)
 
I have a very simple question. I know what to do, but confused. I am working with an assignment. I need to create a stack of books, and its methods(member f...
[no replies]
How to get string input from user with spaces?
 
I am making a program and for that I want to take input from user. User may input a string with spaces. Also, I am not sure how many characters will user enter....
[2 replies] Last: thanks (by StarSonic7)
by Kauto
Trouble sorting an array
 
Write your question here. #include "stdafx.h" #include <iostream> #include <math.h> #include <time.h> #include<iomanip> #in...
[2 replies] Last: What are lines 114 through 118 supposed to be doing? (by cire)
Infinite loop problem
 
When I enter a double number, I get an infinite loop, and when I enter in a character, I get an infinite loop. How can this be fixed? int main() { ...
[3 replies] Last: I like to use a separate function for grabbing and validating inputs. ... (by long double main)
by BC300
File I/O Problem
 
I'm trying to write a program that has to read 10 names from an input file and each name has to have 5 grades. The 5 grades will be in another input file. They ...
[4 replies] Last: I understand how that I need to write 2D arrays...But why do I need an... (by BC300)
by Garion
Default Arguments
 
I am doing something wrong here and I'm not sure what. This is my code and the output should be 2 but the actual output is 1 . #include <iostream> int m...
[6 replies] Last: This is a good explanation about them. http://www.cplusplus.com/articl... (by vasilenko93)
January 2014 Pages: 1... 910111213... 44
  Archived months: [dec2013] [feb2014]

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