General C++ Programming - February 2010 (Page 10)

by cscs
How to use is_integer in include<limit>?
 
For example, I have "int x" and I want to check whether if the user has enter a integer, how to I use it like in a "if" loop or maybe other mean.
[7 replies] Last: To check whether the end of the stream was reached (by Bazzy)
how to compare two maps
 
I need to compare two maps to see if they are equal. The two maps use strings as keys but the values can be of different types. For example. one map can be <str...
[5 replies] Last: One thing to think about is: if two maps have different comparators o... (by jsmith)
by ha101
having a problem with my function
 
Hi i have a problem. I am having a difficultly to change a function to recursive function. This is my iterative function char swap(char charArray , int c...
[no replies]
by ESAINT
C++ Programmer Need Contract Work $$
 
2/15/2010 I am teaching a lower level college course in C++ for Engineers. We are looking to hire a programmer (mid-level minimum) to help us create a solutio...
[1 reply] : This should be posted in the jobs BBS (by Seraphimsan)
Rearrange a set of alphabets putting vowel infront follow by the rest
 
how to rearrange a set of alphabets putting vowel in front follow by the rest of the remaining generated alphabets - i have created the rest of my program but i...
[8 replies] Last: There are many ways of doing this....one way, given that you have fill... (by buffbill)
ifstream::read and NULL's
 
I have the following code that reads the contents of a file: ifstream iFile(pFilename); iFile.seekg(0, ios::end); int length = iFile.tellg(); iFile.seekg(0...
[5 replies] Last: I just noticed that you did not open the file in binary mode. if... (by Duthomhas)
Abstract classes?
 
I have an abstract class and some others that derive from it. The abstract class has only two methods that I don't need to override. (My implementations only ...
[2 replies] Last: @Disch Thanks for your help! (by h4x0rmx)
by Rycul
VS/VS Express -> Can this be causing...
 
Hello good folks, I've been trying to do some DirectX programming (just basic drawing of primitives etc.) but every time I tried a piece code (which were all...
[6 replies] Last: Well I can't post all the code in here so if you want to have a look a... (by Rycul)
Your opion on C++ Compilers (1,2)
 
Im just wondering what other compilers are out there that are pretty good. Right now im using Dev-C++ Bloodshed, which is vary's from my personal experin...
[25 replies] Last: Doesn't work for me. I hate you: it's working now. Why wasn't it ... (by chrisname)
File IO / Print Errors
 
The code shown below is givving me errors about my << operators within the print function have no matches. I am using Lists, what could be the cause?
[1 reply] : What's the actual errors? Bad grammar. What are the actual errors?... (by tummychow)
Sorting a Stack
 
Hello people...hope your holidays was great...but now I'm back with another problem with sorting a Stack..I got the program to run smoothly but I just cant get ...
[9 replies] Last: #include <iostream> #include <string.h> using namespace std; c... (by luther)
gather information from a file PROBLEM
 
I am trying to read a html file to collect data from it. I am currently having a problem with my output (semantic error). I am supposed to read each individual ...
[2 replies] Last: what exactly is the issue? (by guestgulkan)
by ALB
find average
 
can
[3 replies] Last: http://www.cplusplus.com/articles/firedraco1/ (by tummychow)
by enrui
C++ and Media (namely music)
 
I wonder if Juan would do a tutorial on this, but if I wanted to play music over the top of the program running. (the media being inside the program much like a...
[5 replies] Last: Does anything work for both? I have a text based game that runs in ... (by enrui)
file io error
 
I have no idea what is wrong with this function i keep getting an invalid operator for >>. all im doing is inputting data into an object from a file ifst...
[1 reply] : You have two ifstream Din. Remove the first one. Pass Monster M as a ... (by R0mai)
Another template question
 
What I want to do is have Init in a base template class and have it return its derived class. The code below doesn't work, but it illustrates what I wish to ac...
[4 replies] Last: Some of my classes uses a prototype pattern that uses static interface... (by AlwaysLearning)
Vector of pointers
 
Hi guys Can somebody please help me to understand how to make and use a vector of pointers, I am aware that a vector of pointers is used to point to objects...
[5 replies] Last: http://cplusplus.com/reference/stl/vector/ the interesting parts ... (by Incubbus)
What the...!? Weird BCC/Dinkumware error
 
I'm still messing with locales and facets. Can someone explain this one to me? The following code does not work with Borland C++ 5.82: ... #include...
[2 replies] Last: My best guess is that the Borland compiler hasn't initialized the clas... (by Duthomhas)
sizeof(array) returns different values in main() and user defined functions
 
Hello, everyone. I found sizeof(array) only works correctly in main() function. Could you please tell me why? ----------------------------------------------...
[8 replies] Last: // This is the right one, but some compilers (gcc) cannot match //... (by Disch)
Array of c-style strings??
 
I have to create an array of c-style strings that hold the names of the months. I know how to create an array of strings, or a c-style string ( an array of cha...
[1 reply] : const char *months = { "January", "February", /*...*/ }; ... (by R0mai)
February 2010 Pages: 1... 89101112... 21
  Archived months: [jan2010] [mar2010]

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