Beginners - October 2010 (Page 8)

Difference between returning object and returning reference to an object
 
Hi, I am a bit confused about the following decleration: what is the difference between: TraceInfo Tracer::GetTracingInfo(const Pos& Pos) const & ...
[7 replies] Last: So which one to use roughly depends on a trade-off between efficiency ... (by kfmfe04)
Const/String Problems
 
I'm working on a class Word. The objective of the main program is to open a file (which contains a poem), put the file into a dynamic array of pointers, which...
[5 replies] Last: haha, oops. Thanks for catching that ne555. (by sargon94)
constructors and using "new"
 
Hi - I'm a reasonably seasoned C programmer, but very new to C++ (taking a class in C++ right now). My current assignment calls for creating heap space fo...
[3 replies] Last: Outstanding. I guess I should have been able to figure that out myself... (by mzimmers)
by bmos31
Redefining implentation of a push function for an array-based Stack class
 
So I have an assignment to redefine an array-based Stack push() function. The problem itself sounds like it totally defeats the purpose of a stack, but this is ...
[2 replies] Last: Oh, wow, thanks. I was trying to include myTop in the function, but th... (by bmos31)
I/O in classes
 
Tasks Constructor: Your first programming task is to implement the default constructor: Word(); Your constructor must adhere to the following specificat...
[4 replies] Last: Sorry about the mix up. @blackcoder41: What is word.cpp? Is it the co... (by hydride)
Problem with functions
 
EDIT: I just found out that I get this error in Visual C++ 2010 but not Dev-C++... I don't really know what the deal is with that. I have an assignment f...
[1 reply] : Line 14 and 27 you are creating the variable "random" again when you a... (by OHGxLeetGamerxOHG)
by thepro
needs an introduction to c++
 
hey guys im totally new to this form of programming well out and out programming but i wanted to learn how so that i could design programs and what not + i was ...
[1 reply] : If you like reading: http://cplusplus.com/doc/tutorial/ If you like... (by OHGxLeetGamerxOHG)
Menu not responding to input
 
My roguelike game (Yeah, I've heard how the console isn't good, and system() is evil, and conio.h is old. Several times, in fact. So I don't particularly need t...
[1 reply] : Yeah, I've heard ... This is just a little learning project for me.... (by Disch)
Odd getline() behavior (w/o cin >>)
 
While going through the C++ articles on this site to refresh my mind about C++ for the upcoming ACSL Competition, I found a section on Basic Input/Output: http:...
[no replies]
Precision limited to 16 decimal places
 
I wrote the following program to compute pi. The problem is that I want to show more than 16 decimal places worth of accuracy and the out put shows the 16 decim...
[1 reply] : that number is too large to fit in a double, so you're losing precisio... (by Disch)
This use of iterators crashes.
 
Hello, Well... actually I have a short piece of code I would like that you guys analyze. I'm using pointers to iterators but certainly I'm doing it wrong ...
[5 replies] Last: I must be blind, I apologize ! Thank you very much Disch, I've noti... (by joseplusplus)
memory management
 
hi below is my little test program for windows: #include <windows.h> #include <gl/gl.h> #include <stdlib.h> #include <stdio.h> #include <iostream> #inc...
[6 replies] Last: the memory footprint is still staying the same when i clear the vecto... (by Disch)
get; set;
 
I'm trying to write a simple console app and test app that will generate health information for someone but having difficulty with data validation in my get; se...
[no replies]
Function Pointer in classes
 
I am busy making a chess game and I am very new to void* or function pointers. I have created the following .h file and implementation file: Command.h...
[3 replies] Last: You need to pass a Coordinate instance there. Instead, you have just ... (by PanGalactic)
Visual C++ 2010 Problem
 
I am new to C++. I am trying to create my Hello World program on Visual C++ 2010. I created a New Project, Win32 Console, and started an empty project. in...
[11 replies] Last: Agree. For a start, the 2010 help documentation system is shite.. (n... (by guestgulkan)
Loan Program - Error in displaying
 
This is a very simple program yet our professor is requiring the useage of functions and i believe this is where my error lays, but i can no figure it out. It i...
[1 reply] : Please edit your post and put code tags around the source code. (by PanGalactic)
take a single charakter from string
 
Hello, I have made a program which reads a string from the user and store it in a vector, but i have a small problem. I want something that "reads" the s...
[10 replies] Last: It's an exercise for my university... if i don't give it then i will f... (by manolos152)
Scrambled pointers
 
Hi All, I'm really struggling to get a list of pointers to objects to work properly. I have two global lists, vector<Field*> input; vector<Field*> output;...
[3 replies] Last: Thank you Disch, that new code works. I don't know what I was doing w... (by kamikazeUnicorn)
by korbul
Polymorphism destructors
 
First of all , i apologizes if this was asked before , and for my bad English. My question is about the polymorphism tutorial , the last example. I create...
[2 replies] Last: thank you ne555 for your quick reply. It seems to be working now (by korbul)
Can't use dll functions
 
Hi, I load a dll and then I want to use the dll's functions, but if I call a function from the dll, it gives a weird error. The error is on line 53. This ...
[1 reply] : try typedef double (__cdecl *FUNCTION1)(double, double); or typedef... (by Null)
October 2010 Pages: 1... 678910... 42
  Archived months: [sep2010] [nov2010]

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