General C++ Programming - August 2010 (Page 6)

Rewrite Runescape to C++ a good idea??
 
Okay, so a few years back I was a bit of an addict of the well-known MMO Runescape. I quit because of various reasons, all from growing away from it and because...
[11 replies] Last: It will then allow for a better set of graphics with less lag J... (by xorebxebx)
Using local class with std::accumulate?
 
I'm trying to sum the size of buffers in a list. I propose the following solution, using a function local class: size_t size_() const { struct accu...
[1 reply] : Never mind - it's explicitly forbidden by the standard. 14.3.1: A ... (by steve lorimer)
Allocate and deallocate a vector
 
Hi everyone. I have made a function in C++ that uses the std::vector class. I use the vector as the return parameter for the function. To explain the s...
[3 replies] Last: Thanks for the explanations :-) I have made a test, where I want to... (by jesperd)
by Mazd
Registry?
 
hi,help me to delete registry key value.PLease
[8 replies] Last: Thanks guys :) (by Mazd)
Parts of MS Visual Studio 6.0
 
It's our exam tomorrow and it'll include the parts of the IDE we use, Visual Studio 6.0 But I can't find it in the internet. Help?
[10 replies] Last: May be u need these: >workspace >toolbox >propeties sheet >menu ba... (by Mazd)
by igel
Copying binary files
 
Hi, I'm searching for an easy solution to copy a big amount of large binary files, e.g. photos from memory card to hard disk. The files should not change in a...
[2 replies] Last: Hi, Another option, but maybe not as good as the Boost option is to... (by rwan)
Connecting to the Monitor
 
Okay, so I want to write an operating system... Woah! Yeah I know, my current problem is connecting to the monitor. I want to make a function that automatically...
[6 replies] Last: Thanks everyone! (by fruitloop2222)
Inherited Class Constructor Denial
 
Hi. I am trying to define a class that is inherited from another class. //toolbar.h #ifndef TOOLBAR_H #define TOOLBAR_H #include "main.h" class To...
[2 replies] Last: Thank you, works perfectly. (by yoonkwun)
by LB
Default values in parameters
 
Why is it not valid syntax to do something like this? It's not important, it's just that it would seem it is valid. void MyFunction(int a, int b = 2, int c,...
[2 replies] Last: You answered a question I didn't ask, but you answered my original que... (by LB)
Repeating?
 
I would like my program to repeat but I dont know how to use a loop with this (because my brain only knows how to use numbers and loops.) #include <iostream...
[4 replies] Last: Your for loop (lines 8-9) are your problem. At the moment you are simp... (by mcleano)
popen closing prematurely
 
I have written an application that does a popen call to get results from a linux system command (string) that I pass on the command line. Example: ./myapp l...
[1 reply] : Follow up note: I have found part of the issue I believe... tomca... (by ddreggors)
file opperations stop after 90 or so reads
 
i am completely baffled at this problem. what i want to do is simple (well, this one part anyways. the problem is part of a much bigger project), i want to open...
[12 replies] Last: You should check for fgetc() returning EOF, not -1; while EOF is proba... (by chrisname)
Opengl game project compiling error
 
I tried to compile the source code in a programming book called "Beginning Opengl Game Programming". However, I get the following error. Error: 0:1:": ...
[no replies]
Problem
 
Please suggest an efficient method. I have been asked this question in the written examination for placement in a company. Write an program to find the top...
[3 replies] Last: Well I can't say if this is the most efficient method. But it make hea... (by Galik)
by omr
vector std::bad_alloc
 
Hello, the following code is crashing with an instance of std::bad_alloc void print_partitions(vector <vector <int> > &partitions) { vector <int> t...
[9 replies] Last: indeed your suggestion was correct, thanks ne555. I still don't quiet ... (by omr)
by Null
Design question
 
I'm wondering which way is better for throwing exceptions? This? class C { bool private_function(){/* ... */} public: void public_function() {...
[2 replies] Last: So in theory the user only calls public_function(), and the implementa... (by jsmith)
Pointers, Templates, and Header Files
 
I have a couple link errors with my code and I cant figure out exactly whats causing them. Heres my code: Engine.h extern enum options{ ATTACK, SPELL, IT...
[3 replies] Last: Why does Menu have to be a template at all? From the looks of it, and... (by jsmith)
STL associative containers: Find iterator to where an item *would* be
 
For STL associative containers, is it possible to find the position to where an item would be, if it existed? I'm trying to create a banded buffer cache fo...
[2 replies] Last: Perfect, thanks! (by steve lorimer)
by LB
Quick Class Parameter - How?
 
I wasn't sure how to describe this situation so I don't know what to search for on the web. I have two classes, A and B. One of the constructors for B takes ...
[15 replies] Last: I'm so sorry everyone! It seems that this code Image MyImage (Vect(10... (by LB)
What's the if condition to limit a number?
 
So our instructor gave as an exercise where a user inputs a number and if the input number is greater than 1000, it'll compute this. But, there's a maximum numb...
[4 replies] Last: I have fixed your problem. Now if you input number greater than 3200. ... (by dineshcpp)
August 2010 Pages: 1... 45678... 20
  Archived months: [jul2010] [sep2010]

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