General C++ Programming - June 2009 (Page 4)

custom iterators
 
does anyone know of an article that describes how to write iterators for custom classes that will work with the STL algorithms?
[2 replies] Last: This might be a good question to ask "C++ Standard Template Library" b... (by jsmith)
Minimal Perfect hashing!
 
Hi! I need an advice for building a perfect hash.I want to hash week days list sunday monday tuesday wednesday thursday friday saturday by u...
[3 replies] Last: My Hash function is int hash( string word ) { return( ... (by Dufresne)
Calculating Entropy of a file and coding it using Hamming
 
Hello there! I am trying to solve a problem for a project i took and i am in the final part of it...(view below for my until now code) Well the aim is...
[7 replies] Last: kordellas, Try RentACoder if you want to pay someone to do the work: ... (by closed account z05DSL3A)
by R0mai
function template specialization
 
Hi, Is it possible to specialize templated function with templated templates? I'm not sure if it's possible, and if yes what is the proper syntax. I wo...
[5 replies] Last: No, you can't overload on return types. (by Zhuge)
by rj84
convert program to object oriented
 
THIS IS WORKING PROGRAM..NEED HELP TO CONVERT IT INTO OBJECT ORIENTED. #include <iostream> #include <fstream> #include <string> using namespace std; #def...
[3 replies] Last: for one convert your char arrays to strings and use the corresponding ... (by smilodon)
getting info from a database
 
i have recently been wanting to create a phone book program where the user can add, remove and review the phone numbers. i have made the database but i dont kno...
[no replies]
Node Systems?
 
Hi, I come from a 3-D/Special effects background. There are some programs out there where we use a Node System to "program" and effect. Softimage's ICE, Houdini...
[1 reply] : You mean something like this? http://www.silentflow.com/quest3d/quest3... (by helios)
by dkaip
how i replace an element?
 
Hello all. I have iterator it from a wstring vector, and i whant to replace the element in it vector<wstring> a; wstring b(L"a new element"); ....... ...
[2 replies] Last: Thank's very mutch Jim (by dkaip)
by wretch
stack vs. heap memory limits
 
I am running VC++ 2008 Express in Vista. I was experimenting with stack vs. heap memory allocation and immediately ran into stack overflow line 24 trying to al...
[2 replies] Last: Your myClass has a memory leak of 10^7-1 bytes at line 16 I tot... (by wretch)
by vcc
void const f() vs void f() const
 
Could you please explain the different between: void const f() {} and void f() const {} .
[4 replies] Last: I was just messing with you. Haha. :-) (by helios)
deleting a line from text file
 
i know you the steps i have to take to do it open file copy everything but line i want to delete to temp file delete original rename temp to original but...
[3 replies] Last: i have figured you how to delete a line what i want to know how to del... (by poonninja)
use of memset
 
Can anybody tell me the use of memset over simple loop initialization or int a ={0} . This also initializes a to a with 0.. So whats the use of using memset...
[2 replies] Last: It's just used for different things. Your example only works once (... (by helios)
by Deimos
A Doubly Linked List strange issue...
 
Hey everyone. My "Game Engine" required a container in which insert and remove operations are fairly easy. I chose to go with a doubly linked list. I made i...
[9 replies] Last: Well, assert() kills the program; no way to stop it. An unhandled e... (by jsmith)
by pccX
STL book
 
Does anyone have opinions about this book, "The C++ Standard Library: A Tutorial and Reference" By Nicolai M Josuttis. Is it good? Useful? Too old? Easy to unde...
[2 replies] Last: I still have the 1999 version and it is a permanent part of my collect... (by kempofighter)
writing to a text file
 
i want to write to a text file without overwriting what is already there. i also want to write it on the next line down, which shouldn't be hard once i figure o...
[4 replies] Last: how about just opening it with ios::app ?^^... ...lol fail, too... (by Incubbus)
Tutorial code question
 
On page 78 of the tutorial (that is pg 78 of the pdf version) a structure is created with an instance of this structure being called yours, and one of its membe...
[5 replies] Last: myStream is not an int, it is a stringstream if you look line 25 care... (by Bazzy)
Strange problem with C - Double Linked List
 
Hi guys. I'm having a Strange problem. I can't make a pointer NULL, look at the function "remover". I'm trying to delete the first element in the list, but i c...
[2 replies] Last: Man!! Its Work, Sorry for my noob question.... I made a pointer to ... (by Jesuino)
Visual C++
 
I have slowly been learning c++ on my own, and I’m currently learning the ideas of OOP. Some of the material I have refers a lot to Visual C++. Is this an...
[3 replies] Last: Well, actually I've never programmed window applications, so I can't h... (by R0mai)
by lixo1
Multithreading C++ application
 
Hi everybody, Yesterday I finished my C++ application using win32 cosole, only native C++, to be a crossplatform application, using VC++ compiler on windows....
[5 replies] Last: you can increase the cpu time by creating multiple threads. for eg. On... (by writetonsharma)
by ksong
Child class inherites from parent class question
 
Hi, I am trying to call a parent constructor from a child class. class parent{ public: double global; parent(double x){global=x}; } class child...
[7 replies] Last: I still don't see what the constructor of Matrix is meant to do Matr... (by wmheric)
June 2009 Pages: 123456... 13
  Archived months: [may2009] [jul2009]

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