General C++ Programming - April 2009 (Page 18)

Makefile
 
Hi, As suggested by some of the members in this forum, I have started making templates completely in header files. But now when I am making rules for header ...
[2 replies] Last: Huh? (by helios)
How to output the program to txt file?
 
#include<iostream> #include<fstream> #include<cstring> using namespace std; string ConvertName(string &name, bool ToSpace) { if(ToSpace) { for(...
[no replies]
Database Management System
 
Hi! I am trying to make a console (CUI) database application which can store all my user names,passwords or stuff like that using fstream. All was going fine b...
[8 replies] Last: cuz on forms... we are not a compiler I think what CoDeReBel was ... (by kevinchkin)
Container - Set
 
I am trying to use Set in a template class. But on using pair, its not working. It is working with primitive data types. pair<set<int>::iterator, bool>ret;--...
[1 reply] : Where is the second declaration? Can you post the code? (by jsmith)
what is tis error and how can i resolve it
 
can some 1 tell me wad error is tis... d:\program files\microsoft visual studio 9.0\vc\include\stdlib.h(521) : error C2059: syntax error : 'constant' 1>d:\p...
[2 replies] Last: Are you sure your install is not corrupted? Try this: #includ... (by jsmith)
Template Inheritance
 
#include<iostream> using namespace std; template<typename T>class BaseClass { protected: int table; }; template<typename T>class DerivedClass:p...
[2 replies] Last: weird, as far as I knew it should work, in fact it worked for me on VC... (by Gumbercules)
by cipok
lo0p
 
why my while loop can't run??? #include<stdio.h> int main(){ float money,money1,balance,balance1; int deposite1,withdraw,deposite; int password...
[7 replies] Last: oh.. thanks! (by cipok)
Calling base functions in derived classes
 
Alright, I've looked through my book and I haven't really found much help, I'm trying to get player::print() to go off in my menu::print() or at least player::g...
[12 replies] Last: I got it finished now, thanks for the help, sorry I was so hardheaded ... (by Bishopssix)
Accessing files within a folder (1,2)
 
I am writing a program that will have .dat files within a folder. The user will input the folder, and there should be a few .dat files within. How do I open up ...
[26 replies] Last: so now you must have changed your code, what's the final code, post it... (by writetonsharma)
Could someone tell me what's wrong with my script?
 
I've been looking at it for awhile and I think if a someone else takes a fresh look at it, it might help identify the problem. I'm making a small calculator. It...
[4 replies] Last: Ah, thank you. I didn't know anything about breaks. I'll look them up ... (by thekingofbs)
by Jonti
Passing Object by Reference
 
Hi, I am trying to read a file that contains words. I have set up a class which acts like a vector and adds, removes..etc.The idea is to read in the words fr...
[2 replies] Last: hahaha... how easy was that. Just one character in the right spot. So ... (by Jonti)
by whacko
delete not destroying pointer...
 
hello, anyway my issue is with gcc4.x, if this is the appropriate forum. i'm trying to do this: #include<iostream> #include<cstdlib> using namespace std;...
[1 reply] : You have to declare the p array with brackets. int* p = new int ... (by eker676)
(SOLVED) Hangman game. Works. Compiles. Yet, there's an error!
 
Hey guys, I created a hangman game. The assignment was to redo the hangman game that was given in our book and to reconstruct it using methods. Which I did. E...
[5 replies] Last: I have to use an old version of Dev C++ at school and I hate it with a... (by eker676)
by guykun
Dynamic Array created too big
 
I am using char* stringl = new char ; to create a dynamic array with the size templength From debugging in visual studio, it quite clearly shows that templ...
[5 replies] Last: As kbw said, they aren't random characters. They're there for debug p... (by jRaskell)
Pointer alignement
 
Can someone help me on this Suppose I have a pointer to a NODE object NODE *ptr = new NODE(); ptr = ptr | 0x01 After this if I do, ptr->method()...
[6 replies] Last: So all member functions are are functions that have an implicit parame... (by jsmith)
function as template arguments
 
Hello, I have a function that calls intensively an other function. But I need to be able to change this latest function to test different configurations. ...
[11 replies] Last: No, using the keyword inline only asks the compiler to inline it if po... (by jsmith)
double pointer
 
I am not clear about creting arrays of arrays using double pointer. can any one explain it...... I want so data on double poinets can u please give me some ...
[4 replies] Last: Tristanm is correct. int** is a pointer to an int* . And int... (by kbw)
Reentrant lock
 
Can somebody guide me to write a code for Reentrant lock?
[3 replies] Last: For Unix, yes. (by kbw)
Deleting from a Linked List
 
I'm trying to delete a node from a linked list by a position that is passed in by a parameter. Here's my code: void NumberList::deleteByPosition(int pos) ...
[2 replies] Last: the pos variable is where in the list I want the node to be deleted. s... (by chaseshaw275)
by dkaip
reverse for wchar_t *
 
Hello all. I need a reverse for wchar_t * function for my program. Thank's Jim
[8 replies] Last: std::reverse( name.begin(), name.end() ); (by jsmith)
April 2009 Pages: 1... 1617181920
  Archived months: [mar2009] [may2009]

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