49,761 Topics

Member Avatar for
Member Avatar for hezfast2

Hello, I'm almost done with this program, but when I want to sell an item (option 2) I get an error after I enter how many 'vector subscript out of range'. The program compiles correctly, but I cannot for the life of me figure this one out. Any Help? [code] …

Member Avatar for littlestone
0
387
Member Avatar for toolbox03

How do i read in an equation in this format: 1 + 2a + 3b + 4c? I need to extract only the value 1, 2, 3, 4.

Member Avatar for toolbox03
0
139
Member Avatar for dark_ivader

Hello, ive recently been making a program, and am trying to do some file i/o so that it can log information. Ive been trying to do it via a class. Well, i ran into a problem just clearing the char arrays (for my purposes they need to be cleared to …

Member Avatar for Lerner
0
110
Member Avatar for lahom

hi i have a dialog based application with edit box control...i know how to save the data from the edit box to a certain file.and open it again (but i need to open the dialog and press the open button and choose the file then ok)... it is along way. …

0
74
Member Avatar for mhopeck

I'm trying to code a program that compares multiple values of two variables (CI and CF). CI contains one variable that can have 1 of 10 values, and CF contains variables which must be solved themselves (and one of these containing a variable that can have 1 of 3 values). …

Member Avatar for mhopeck
0
79
Member Avatar for sfurlow2
Member Avatar for hezfast2

Hi all. I'm having a minor problem with cases in my program. If I enter a number that is out of my case range (say I enter a 10 when there are only 4 cases) I've got my default to output an error prompt. When I enter a character, say …

Member Avatar for hezfast2
0
101
Member Avatar for sfurlow2

I'm trying to create 1000 random numbers using an array. I keep getting the same number everytime, though. How do I get 1000 different random numbers? Here's what I have so far: [CODE][LIST=1] [*]#include "stub.h" [*]int main() [*]{ [*] int number[1000], i; [*] int r[1000]; [*] [*] for(i=0; i<1000; i++) …

Member Avatar for Blondeamon
0
89
Member Avatar for Nemoticchigga

I have a visual studio 2005 form application. I also have created a header and source file with gets and sets and private variables for some of the data. How do I pass this data between forms? Ive looked at delegates but am having trouble understanding, is there another way, …

Member Avatar for Radical Edward
0
71
Member Avatar for Icebone1000

Thats the first time i started mess whit differents projects, and i got lost whit some things...very noob by the way... first, in a windowed project, i noticed my couts are not showed in the screen, so, how i supose should test my code? to see the result of variables, …

Member Avatar for Radical Edward
0
86
Member Avatar for potentialdesign

ok so i know all there is to know with text programming in c++. now i need to know how to give my program an interface. you know, like not using the command prompt any more.:S

Member Avatar for potentialdesign
0
116
Member Avatar for CodeBoy101

Is there a way to chose where a program outputs text to a file ?(or read text from a file). As in selecting which line to start from.? Any help is welcome. :)

Member Avatar for CodeBoy101
0
140
Member Avatar for Nemoticchigga

Does anyone know how to convert a "String^" data type in a visual studio 2005 forms app to an "int"? Ive tried atoi and casting to no success. Any ideas? Thanks.

Member Avatar for Nemoticchigga
0
98
Member Avatar for nouryn

i need help in c++ program I'm asked to make a phone book which can sort all the names in it alphabetically plllllz i need help

Member Avatar for nouryn
0
177
Member Avatar for MAPONYA

Write a C++ program ,that uses modularisation. The program allows the end user to enter a test mark which is converted into persantage by a particular funtion, the test mark is returned to main(), another funtion is called which detemines whether the student passed or failed if ist a pass …

Member Avatar for real_napster
0
141
Member Avatar for elementz

I just found a tutorial that teaches how to change the transparency of a text box with an Increase transparency and Decrease transparency button. I tried to work it but then realised the code was meant for C#. I am just wondering what code I would use to change the …

Member Avatar for marco93
0
126
Member Avatar for Raptoricus

Hi there, I've been writing in c++ for a little while now and am starting to feel more confident, I've noticed a possible error in a game I've been making, it is that when the player is inputting a character name, it is a possibility that they may put in …

Member Avatar for Radical Edward
0
167
Member Avatar for tones1986

Hey All - i working on a assignment for school. Given that, i would like to say i have attempted numerous ways to get this working, and its a simple part of teh assignment. Basically i am having problems with my 'insert node' method. I am unsure how i have …

Member Avatar for Radical Edward
0
108
Member Avatar for computers08

[code] double two( double, double); [/code] if the parameters are 17.5 and 18.3, what will it return? Please help

Member Avatar for Ancient Dragon
0
86
Member Avatar for computers08

[code] int test(int, char, double, int); double two(double, double) char three (int, int char, double); [/code] I need a statement for the function test with the actual parameters 5, 5,7.3, and 'z' please help

Member Avatar for Prabakar
0
92
Member Avatar for bhuwanrc

[code=cplusplus] #include<iostream> #include<vector> using namespace std; int main() { const int TYPE_OF_FISH=4; vector<Fish*>FishVec(TYPE_OF_FISH); FishVec[0]=new AustralianBass(); FishVec[1]=new EelTailedCatfish(); FishVec[2]=new GippslandPerch(); FishVec[3]=new ShortFinedEel(); cout<<"welcome for fish catching \n"; cout<<"press any to go out \n"; cout<<"keep pressing enter to get catch\n"; int i; Fish* aFish; char response; RandomInt d4(0,TYPE_OF_FISH-1); for(;;) { cin.get(response); if(response!='\n') …

Member Avatar for bhuwanrc
0
61
Member Avatar for Run.[it]

Im trying to figure out how to utilise a program that uses Aggregation of Classes, Im having trouble calling the operations of the Classes in my main. Could anyone assist where Im going wrong?! horse.h [code=cpp] #include <iostream> #include "distance.h" using namespace std; class Distance; class Horse { private : …

Member Avatar for Run.[it]
0
149
Member Avatar for HugoRocha

I need a way to convert a variable to an int or to ascii code, tried atoi, static_cast, didnt work very well... The objective is to detect if the user inserted any character other than a number, a number smaller than 0 or larger than 5, and send a message …

Member Avatar for HugoRocha
0
99
Member Avatar for asadullah

Detail About Recursion and its Type Here I am going to give a detail about Recursion in C++. Definition: Recursion is the process where a function is called itself but stack frame will be out of limit because function call will be infinite times. So a termination condition is mandatory …

0
161
Member Avatar for Squeeker

I am studying for a C++ exam and the study guide says "Be able to initialize arrays using literal arrays." Ok then, so I think well yeah that is easy, a literal array is something like.....Wait, I have no idea what a literal array is! From what I can find …

Member Avatar for Squeeker
0
183
Member Avatar for dazed&confuzed

-- If you know of a shorter way to do this .. post away plz -- the nightscost and totalcost cause erros ( call to undefined function ) -- get a fair amount of warnings, but i can live with warnings [code=cplusplus] #include <iostream> #include "Thefunctions.cpp" using namespace std; int …

Member Avatar for dazed&confuzed
0
106
Member Avatar for scarface3288

I have succesfully done this but with one error. using ... ifstream input("infile.txt",ios::in) while(input.good()) { input.getline(file,100); outputfile<<file<<endl; } then I have some new code that writes this into another file. You may laugh when you hear this but the problem is that it add an extra line to the output …

Member Avatar for scarface3288
0
85
Member Avatar for tones1986

Hi all. I am having a hard time trying to properly declare a header for my assignment overload operator function. My prototype for the function is: [code] const BSTree<T>& operator=(const BSTree<T>&); [/code] And my attempt to write the header for the method is as follows: [code] template <class T> const …

Member Avatar for tones1986
0
88
Member Avatar for Zubb

This is my second time taking C++ course and I'm about to fail again since I'm barely hanging on with a C-D grade percentage. Here is the problem. I'm using the book "Beginning C++ Through Game Programming - 2nd Edition" and Dev-C++ to compile code. I'm not even majoring in …

Member Avatar for Ancient Dragon
0
175
Member Avatar for zsamus.love

[CODE] const SimpleCat * const FunctionTwo (const SimpleCat * const theCat);[/CODE] Ok so this is a function declaration. I'll pose my questions numbered so it is easier. I'm taking an online course in C++ but got stumped on this line of code. 1. The return type is of type SimpleCat …

Member Avatar for bugmenot
0
85

The End.