General C++ Programming - November 2011 (Page 12)

by Gldnbr
Changing up the array
 
Okay, there's more explained here than what the title says, Let's say I store a string split up i...
[2 replies] Last: I ended up using switch/case statements. Thanks anyways (by Gldnbr)
Set a bool based on conditional
 
Suppose I have this simple operation: bool is_larger = someint > 5 ? 1 : 0; the conditional ...
[2 replies] Last: thanks (by ausairman)
by Gldnbr
Counting characters in an array
 
How do I count how many characters of a string are stored in an array? For example: int main() { ...
[5 replies] Last: In c and C++ all strings are arrays which end with NULL C++ provides ... (by buffbill)
Converting string to float array
 
Hi am reading a file that looks like this: 230#Louis Christakes#1000#500 130#Paul Konerko#2000...
[no replies]
Help Dynamic Array File Reading
 
Hello. I am currently looking to write a program that reads the number input by a user, searches tha...
[5 replies] Last: Not exactally sure. The way this works is the find function searches f... (by cscho0415)
databasing and tables
 
So I am looking to create some sort of table or database in a program to store important information...
[3 replies] Last: Well essentially I will be making a table of device ID's and their IP ... (by cscho0415)
rtti & virtual
 
Is there a way to avoid this ugly rtti? integer dimension needed in make(). class Relation { vo...
[3 replies] Last: Ooops... Yeah you right. What I am thinking? (by chameleon)
Passing Array to a Function
 
Hey Everyone, I recently ran into a problem when passing 3 arrays into a function that is supposed t...
[5 replies] Last: Thank you so much! That worked like a charm. (by jgeorge)
How to terminate the program from class?
 
Hello everyone ! I'm trying to terminate a program from inside a function in my class. Look Below: ...
[5 replies] Last: Thanks, that's right :) (by Iamcrysis)
Help please.
 
I'm not really sure how to make my own class could someone give me some details.Btw please don't spa...
[1 reply] : #include <header> or #include "local file" just (almost) copy and ... (by Mathhead200)
by mc84ss
Array of Pointers to ints
 
This is my assignment and I thought I made a program that would work, but the instructor says that w...
[1 reply] : The syntax would look like: int **x = new int* ; . Then later to acce... (by Mathhead200)
Overloading Operators
 
I'm trying to make a dice class and I want to have a way to do something like Dice d6(); int x; ...
[2 replies] Last: I'm about to leave so here's my code so far. main.cpp #include "dice... (by James Grider)
Class in function argument?
 
Hey, I've got two classes, a sprite class and a player class. I'm trying to pass in the Sprite class...
[8 replies] Last: Fine, but can you show some more code? If it's complaining about a lin... (by Pyrius)
For looping,alphabetical
 
#include <iostream> #include<string> using namespace std; int main(){ int number; str...
[10 replies] Last: Sorry my solution when wrong on the part output that i have bold How... (by xenon69)
by myx360
final integer in loop not passing to function
 
C++ problem Hi, I have 2 arrays of objects set up and they seem to be working fine. but I have a wh...
[3 replies] Last: myx360 that was simple and good .... (by bluecoder)
Regarding main() function
 
Where does the value returned by this code go ? int main() { /* Prg Code */ } Can ...
[1 reply] : Normally this value is returned directly to the operating system, but ... (by Computergeek01)
Frustrated by a problem I don't see !
 
Hello everyone ! I'm having a weird problem after execution. Here's my code : #include<iostream...
[3 replies] Last: int main() { string Number_, Description_; double Price_; int Quantit... (by bluecoder)
WASD Key movement c++
 
Hey everyone, first board post here. Taking my first c++ class and i need help with my dungeon crawl...
[7 replies] Last: Thanks for the help everyone. I ended up using the switch statement si... (by pegleg123)
y not void main() ?
 
I have heard many times dat void main() is not standard c++ and one should use int main() and return...
[7 replies] Last: @OP if you're developing a command line utility then the return value ... (by ceruleus)
Tell me the working of this simple line
 
1.int x=10,y; 2.y = x++ + ++x; In line 2 the compiler starts the processing (or whatever its cal...
[2 replies] Last: The expression x++ + ++x is an error in C++ (and in C, for that matt... (by Cubbi)
November 2011 Pages: 1... 1011121314... 47
  Archived months: [oct2011] [dec2011]

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