Beginners - October 2011 (Page 33)

visual studio won't accept my class template
 
hi Basically I've got a pure virtual member class with a template( CStates<qXType_state> ). And the issue is that I can't get my other class's function Changi...
[no replies]
how to print text at the same time as a cin function but below it
 
#include <iostream> #include <limits> using namespace std; #pragma once class KeepRunning { public: ~KeepRunning() { system("pause");//...
[1 reply] : I don't understand what you mean. std::system( "PAUSE" ) prints "pr... (by closed account zb0S216C)
by buggys
Hit a wall
 
OK, so i'm trying to make a simple game with opengl, i want an inventory on the game to be initialized when i press the key 'I' and after that i want it to disa...
[2 replies] Last: its something I've never really looked into :P, will have a look now, ... (by buggys)
Declaration Help?
 
I've got a bit of an issue with my function. I'm trying to return a constant reference to a pointer. The target pointer is a non-constant data member (pointer, ...
[7 replies] Last: [quote=EricDu]But again, if TypeSpec is "int *" for example, this->Reg... (by closed account zb0S216C)
by Chathu
Binary Files - How To Read Data
 
This is the way i did it. but it isn't working. What is the error in my code. plz help Employee e;//object of class employee fstream myfile; myfile.open("...
[5 replies] Last: Yes. There is an overloaded cast from stream (istream/ostream) to voi... (by shacktar)
by Yooper
Upper case inclusion/Invalid Entries
 
Thank you Framework for the help yesterday. I kind of went down a different path with my code though. I got it to work somewhat, but I have a couple more questi...
[3 replies] Last: Anyone able to tell me why when I enter an invalid length, width, dept... (by Yooper)
Am I on the right track?
 
In this program: #include <iostream> #include <cmath> using namespace std; int main() {int a = 750; if (a > 0) if (a>=1000) a=0; else...
[4 replies] Last: [quote=AARON HENDERSON]Thank you kind sir. (sic) Blessing of Akatosh ... (by closed account zb0S216C)
switch statemet letters to numbers conversion
 
I have tried to structure my program but im stuck at this point. I have a file that contains phone phrases on each line (1-900-WINNING), is one of the phrases, ...
[4 replies] Last: -I dont see whats wrong with while(inFile) -I handled 0 but don't know... (by killintime)
Classes giving me hell
 
Define a class to represent a bank account. include the following members. Data members a. Name of depositor b. Account number c. type of account(savi...
[5 replies] Last: It is policy here not to do your homework for you. We will help you wi... (by Moschops)
by Tatipu
ASCII Characters for assignment help?
 
I have an assignment where I have to use random and seed and all that great stuff but I don't understand how to use random with characters? My assignment menti...
[no replies]
strange compilation error on <stdlib.h>
 
Hello all, I am trying to compile a thread program using g++ running on windows 7. I have the latest pthread lib and the compiler installed. Here's my sim...
[4 replies] Last: What happens if you use the modern C++ headers <iostream> and <cstdlib... (by Moschops)
constructor implementation using inheritance
 
Hello guys, I have recently started to use the OSGart project and it is all written in c++. I would like to ask some simple questions about the following cons...
[1 reply] : There is not any silly question from beginner but lazy hands to search... (by EricDu)
Multiple struct definitions
 
I have a class with a class.h and i have a global.h (witch hold global macros and a struct) The global.h is included both in the main.cpp and the class.cpp and ...
[2 replies] Last: Moschops, thanks for replying. I can see from the last example in the ... (by Slartibartfaster)
Simple class problem
 
My codes below, i'm basically trying to get my head around inheritance and classes, and objects. so i was hoping to create two types of 'player'. and then be ...
[4 replies] Last: That's excellent! thank you for the detailed explanation, it really e... (by thebuzzards)
Header file problem "conio+.h"
 
Hello. I got a problem with a header file or library in c++. We are supposed to use this in our c++ course but I dont get it to work. The library name is conio+...
[6 replies] Last: To programming as a whole I have been doing things for a while, howeve... (by shooninjo)
by sesch
Determining the size of an array needed to store unknown amount of integers
 
Let's say you have a text file with x amount of numbers stored one by one in seperated text lines, you load them all word by word into a string and then convert...
[4 replies] Last: You can make a vector's push_back more efficient be reserving space, i... (by andywestken)
next point
 
well hey everyone im new here , i was reading Bjarne Stroustrup - The C++ Programming Language(Third Edition) but was stucked at the very first chapters with th...
[3 replies] Last: i believe its read able now, always remember system("PAUSE"); when us... (by Stupebrett)
Pointer to differnt .CPP array help
 
i have two .cpp's called first.cpp and third.cpp and one header called second.h first.cpp using namespace std; #include "second.h" int main() { in...
[1 reply] : unsigned function(int * arr) or int arr . Note that this does not ... (by hamsterman)
SDL simple game change level
 
Hey guys, have been learning c++ for about half a year and have decided to create a simple 2d game using the SDL library. Although the code is prett...
[5 replies] Last: Hmmm, a 700-line main function and you're finding it difficult to add ... (by keineahnung)
Defining Classes separate files? HELP
 
Hi. So I'm practicing on how to create classes the proper way, but it doesn't seem to be working? Here's the source: MAIN: #include <iostream> #include <strin...
[1 reply] : Nevermind, I discovered the problem. For some reason on code::blocks, ... (by hellohellomoon)
October 2011 Pages: 1... 3132333435... 59
  Archived months: [sep2011] [nov2011]

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