General C++ Programming - August 2008

by wdth
Problem with C++ Structures
 
For a exercise in a book I am using, I have to show a menu on screen, and show stuff from part of a structure depending on what the user picked. Struct proto...
[3 replies] Last: If your book has a section on the <cstring> library take a look throug... (by Duthomhas)
How to change elements in a vector to lower case
 
Hello, I am wondering how do you apply tolower() to elements in a string vector. Below is the code that I have so far and it isn't working!! #include <iostr...
[7 replies] Last: @HarryGabriel91: CBaseConfigLoader is one of my classes in a project, ... (by Zaita)
getting user input past a space
 
I've tried a few things to accomplish this, ranging from c to c++ io functions (cin and scanf) and c++ and c-style (array) strings... if I use c# or any of t...
[2 replies] Last: thanks a lot, Im surprised I didnt already know about that... (by closed account 2EwbqMoL)
by voodoo
c++ programming problem
 
something is wrong in my program....why that it only outputs (invalid gender) can someone help me fix this program........i really need to finish my homework t...
[no replies]
by Mobius
FStream - questions about getline
 
I know fstream's functions (member and inherited), but I was wondering if there is a variant of getline that will target a specified line number in the opened...
[1 reply] : No, you need to read every line until the line you need. Probably n... (by helios)
break nested loop
 
Dear all i have a little problem in my programing i have a nested for loop and in the final loop i have to get out of all the nested loop( by the way i tried...
[3 replies] Last: Dear JMC i just want to thank you for your good idea, it is helpfu... (by mark2008storm)
My cursors have lost their colors!
 
Hi, I've created a win32 app and when I add custom mouse cursors in C++ (I'm using VS2005) they become black and white... Can anyone explain if there's an...
[no replies]
Pong program, moving the ball, assistance needed
 
I'm sorry if this is in the wrong forum, but here it is. I've decided to make pong as my first BIG program, not trying to get into anything to deep with DarkGDK...
[10 replies] Last: Okay, thanks to you and some source code I found I finally made it mov... (by Iacoopa)
by mikej
Updating a Map
 
Hi, I have a map data structure defined as std::map<<pair<int, int>, vector<aStruct> > where aStruct is a structure. I don't want to use pointers in the...
[2 replies] Last: beautiful. Yes, it worked. Thanks you. ; ) mike (by mikej)
Better code with if
 
Which one is better: 1. if + continue while (1) { some_thing_and_many_more; ...; if (condition) { many_thing; continue ; // rep...
[9 replies] Last: ... because your program can make a short instead of a long jump. W... (by chu121su12)
by lipune
connectivity,c++ to oracle8i
 
Hi ,, what is the way to connect c++ to database ,lke oracle8i through sql querry,,,in unix platform,wt querry i have to use and wt header file i have to ad...
[3 replies] Last: Hello, can any body post any example for Connecting C++ to Oracle8i... (by kunalnandi)
by Mobius
Sequential Variables
 
I want to automate the creation and editing of a series of sequential variables within a piece of code, but I'm still fresh to C++, so I'm a little shaky on the...
[8 replies] Last: @zhuge : y... forgot that... damn^^... @helios: i first defined the... (by Incubbus)
by Tupac
Overloading Operators
 
Hi friends, I want to overload operators as part of an Array class in order to (1) Get a value and (2) Set a value, but checking the boundaries of this Array...
[9 replies] Last: There is no such thing as the = operator. The solution to your pro... (by Duthomhas)
Password Masking
 
I'm writing a program that requires the user to enter a password to gain access to the program. I want the program to mask what the user enters. After searchi...
[16 replies] Last: I did check to see what those special keys look like and essentially, ... (by aeronet)
Output extended ASCII chars
 
...
[5 replies] Last: Not to beat a dead horse, but I found a nice article about the treache... (by Duthomhas)
by bomben
new operator gives back same address
 
Hi all, I have a method in which I create some objects using 'new' operator: idealTrack = new SbtTrack( aListOfPoints, SbtEnums::idealTrack ); ...
[11 replies] Last: You get the same address twice since once you delete it the memory m... (by Duthomhas)
simple template class inheritance
 
template<class Z> class A1{ protected : Z u; public: A1(Z pu):u(pu){} Z getU(){return u;} }; template <class Z> class A2:public A1<Z>{ ...
[no replies]
What can be the reason for ambiguous call?
 
Hi, This is my code : <Code> // The BROWSEINFO struct tells the shell // how it should display the dialog. BROWSEINFO bi; memset(&bi, '...
[7 replies] Last: Hi Harry, I have initialized that structure manually and i removed ... (by sivasakthi)
by jorhen
prime numbers
 
hi guys, can any body give some simple codes about printing a series of prime number in any limit of integer? thanks....ASAP...
[3 replies] Last: thanks i get it,,,, more power, jho (by jorhen)
how to create an enum type object which is inside a class
 
hi how to create an enum type object which is inside a class.The enum object is created ouside the class.
[12 replies] Last: when we declare enum wt size it takes.means wts memory it occupy. (by lipune)
August 2008 Pages: 123... 9
  Archived months: [jul2008] [sep2008]

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