Beginners - December 2013 (Page 2)

file input (1,2)
 
This was my attempt to read data in from a file. The file is stored in the same folder (directory) as the .cpp file. #include <iostream> //ignore the sur...
[27 replies] Last: Hey, one last note. Want to know where else .eof() returns true and th... (by S G H)
by qmzh85
header file "cctype" not required?
 
Hi all: I tested a simple program from C++ Primer, 5th edition, Chapter 3. The example asks to convert the first word into uppercase. The code goes as below....
[2 replies] Last: Thanks for the explanation. I believe it's still a good habit to inclu... (by qmzh85)
Define and #ifdef
 
I see a lot of c++ codes that has in the first lines anything like #ifndef anything_h #define anything_h I know what this code does, but I j...
[1 reply] : http://www.cplusplus.com/forum/articles/10627/#msg49679 (by ne555)
Question about the copy constructor
 
Hello, recently I've been doing some exercises in an attempt to remember how to overload operators. I've also decided to make a copy constructor #include ...
[15 replies] Last: The above was in reference to Microsoft Visual Studios 2008. msvs is... (by closed account Dy7SLyTq)
Need help with tic tac toe program
 
I made a tic tac toe game program. Whenever a player makes a move it tells the new field statistics on new lines. How can I make it so that it does not use new ...
[1 reply] : You can't. Once it has been printed to the console you can't change it... (by closed account 3qX21hU5)
Visual Studio 2012 Issue
 
I am working on a small project and I keep coming up on this same issue with Visual Studio. I am not sure if this is a Visual Studio specific issue or maybe jus...
[13 replies] Last: Thank you very much for putting so much effort in to explaining! Very... (by Hambone)
How does this "christmas tree" program work
 
Hello, I recently saw a a program that takes an integer, and prints a christmas tree (made of '*' s ) using the integer as the number of rows. Unfortunately the...
[5 replies] Last: Wouldn't this effectively do the same thing using a while loop with tw... (by CplusplusAcolyte)
Problem with output(vectors)
 
Okay so when i give this program the input of "5+5", it gives me the output of 106, its supposed to be 10. Thanks #include <iostream> #include <vector>...
[4 replies] Last: Thanks Zereo. Great help thanks (by closed account EwCjE3v7)
Struct and Typedef
 
I want to understand the greate difference between a struct and a typedef struct . For example: 1. typedef struct { int day, month, year; } D...
[1 reply] : In C, struct declarations did not introduce type names, a C program th... (by Cubbi)
by ZotIc
HashMap Implementation - 0x0000005 Error
 
Hi, This is my first post on this forum! :) I have been trying to implement a HashMap in C++, but I keep getting the "Process returned -1073741819 (0xC0000005)"...
[3 replies] Last: Thank you for your replies! I fixed the constructor of Link class and ... (by ZotIc)
Need Help Understanding Pointers
 
Ladies and Gentlemen of Cplusplus.com, maybe you can help me with understanding pointers. I understand the basics; int *p = NULL; int num = 20; p = &num; ...
[3 replies] Last: Thank you, sirs, that makes me understand now. (by closed account 91qLy60M)
Insert a struct into an array in another class
 
Hello again, i can't add a struct to an array that reside on another class How can i do? Assuming i have an array of a struct and that in my main functio...
[5 replies] Last: @nt3 Hello, i sent you a PM (by Amiplus)
how to get input fromtext file to c++source progarm
 
Write your question here. #include<iostream.h> #include<conio.h> #include<stdlib.h> #include<string.h> #include<fstream.h> #include<graphics.h> void in...
[1 reply] : scores.txt format James J Jones 80 Mike M Martin 95 File input exam... (by mobotus)
Borland C++ help for project!
 
# include <iostream.h> # include <conio.h> # include <stdlib.h> # include <stdio.h> # include <dos.h> # include <string.h> struct stock{ char name ; ch...
[1 reply] : First I would suggest moving this to the beginners section since you w... (by closed account 3qX21hU5)
Exceptions
 
This is an extract from a note that i'm learning from. I don't understand the try block and the first catch block in the code. Thanks! int divide ( cons...
[1 reply] : try { //Try doing something } catch(//Error name) //If an error ... (by Stormboy)
stoi and c++ 11
 
Hi. I would like to use the function stoi, so I could convert a string to an int more easily. The problem is that everytime I try to use it, I get an error m...
[19 replies] Last: > I would like to use the function stoi, so I could convert a string t... (by JLBorges)
ifstream problem
 
Ok so here is my function to see if file exists and if it does not exist have it create the file. I have read several things online and still can not get this t...
[4 replies] Last: Glandy That fixed it. works like a charm now! I'm sure ill hit some ot... (by ultratoke)
help please
 
Write your question here. my teacher gave us this assignment and refuse to help... the class has to exactly the way it is Design and implement a class dayT...
[6 replies] Last: Implement like you would anything else: //Constructors //Finish up d... (by mobotus)
Time Script
 
I'm currently having trouble finding out a way to run simulations automatically every 3 seconds. I've been working on a small simulation console game (At them m...
[9 replies] Last: For GCC, you'll also need to enable C++11 features using either -std=... (by long double main)
Derive function acess
 
Why cant it access derive class function isn't pointer pointer pointing at adreess of derived class and should access all it's functions it does access virtual ...
[1 reply] : First off, prt is of type Base. Base * ptr; You assigned it the a... (by closed account j3Rz8vqX)
December 2013 Pages: 1234... 69
  Archived months: [nov2013] [jan2014]

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