48,985 Topics

Member Avatar for
Member Avatar for boujibabe

I have been given an assignment to write a class to accomodate the following code: [code] int getMenuOption (); int main () { int option; int id; char name[80]; //create a Salesperson object and sets all 12 monthly sales to 0. Salesperson sp; cout << "Enter name: "; cin.getline(name, 80); …

Member Avatar for boujibabe
0
275
Member Avatar for rharvison

Hi all. I am very new at this stuff; first C++ Programming class with no background whatsoever. We are asked to create the design work and coding to generate an invoice given certain criteria. I wrote the program using the info and directives provided but I am coming up with …

Member Avatar for rharvison
1
156
Member Avatar for rporter1

I have found out through the compiler that you cannot declare and initialize an array within a class header file. I was trying to figure out how I might go about getting a 5 by 14 array initialized as a private mamber within the class. I have included the header …

Member Avatar for Tight_Coder_Ex
0
188
Member Avatar for VeG

was wondering if someone could help me on this slight problem my rogram compiles but a section doesnt seem to run.. } void main() { clrscr(); int one, two, three; char choice=' ', input[5]; while (choice != 'e') { cout<<"\nPlease enter +,-,*,/ or sqrt and then two numbers,\nsepperated by spaces, …

Member Avatar for Acidburn
0
98
Member Avatar for s47221288

This is my project about: league table , print result of score i attach all my code in filename c++.zip -------------------------------------------------------- my program : 1. you must select O to open teams.txt 2. then select I to input a score 3. select P to print a result ps.- this program …

Member Avatar for Siersan
0
56
Member Avatar for alastair18

I am rather inexperienced at C/C++ so hopefully my question will be easy to answer. I have created a struct which contains vectors. I read in data from a file into the various vectors in each struct do a bit of maths, write the results to another file, clear the …

Member Avatar for Siersan
0
100
Member Avatar for Tripoli178

I'm was working on a c++ program that inolved calsses and when i got done with it was running good. Now I need to use that program in GUI. Is thier any advice on using the C++".exe" file in GUI Thanks :rolleyes:

Member Avatar for Siersan
0
29
Member Avatar for Genar Codina

I am trying to call a stored function (which makes basically a select query)from a VC++ program using OCI. The description of the stored function is: [code] FUNCTION patrick.P_DICTIONARY_FOR_RISK_GROUP RETURNS REF CURSOR Argument Name Type In/Out Default? ---------------- ------------- --------------- V_RISKGROUP VARCHAR2 IN V_DICTIONARY VARCHAR2 IN V_MARKETDATA VARCHAR2 IN V_MODE …

0
90
Member Avatar for s47221288

so i have 4 integer that are int m = rand() % 3+ 0; int n = rand() % 3 + 0; int x = rand() % 3 + 0; int y = rand() % 3 + 0; and i want to random in 0-3 range so how can i …

Member Avatar for Siersan
0
104
Member Avatar for syphyr_0707

Hello all, I am taking a C++ class after not touching it for about 4 years now... I am rather dusty. My book is horrible, I am trying to randomly select a switch case for a word output. This is my latest attempt: ******************************************************* [code] void right(); void wrong(); int …

Member Avatar for syphyr_0707
0
90
Member Avatar for s47221288

Hi, I'm a thai student ... now i have a premiership project but i can't pass this problem that is , How to random matching football team ? example I have 4 team in `vector<string>` name [0]=a [1]=b [2]=c [3]=d I want to matching them such as week 1 : …

Member Avatar for s47221288
0
102
Member Avatar for Gav2

Have been issued a problem. 'Design a program using the top down stepwise refinement. This should include a structure chart and pseudo code' The program is to control a temperature process, with two reference temperatures. Dont understand a word of this - can anyone help PLEASE? :sad:

Member Avatar for Siersan
0
113
Member Avatar for migthyjohn

i hate C++. i have been working through the C++ for dummies book, and i have yet to make any sense out of it. the only thing that i have been able to grasp is the i/o parts. it is so hard. maybe i havent given it a chance to …

Member Avatar for Siersan
0
113
Member Avatar for samyn

hi .. im doin an assignment on edlin text editor.. while implementing the insert new line function i need to exit a loop when a key combination is pressed.. inside the loop there will be some lines reading input from the user..so will be somting like below while( ? ) …

Member Avatar for samyn
0
111
Member Avatar for cap2361

when I complile this program and then try to run it I get error LNK1201. So I started over and left it complile to c:\ and when I try to run it I get file could not be opened. I think the objective is to compile on c:\ and save …

Member Avatar for cap2361
0
118
Member Avatar for mrb260478

Can somebody help me in getting cursor position using C++ Programming language on a UNIX operating system. :cool:

Member Avatar for vegaseat
0
110
Member Avatar for noyz

the problem is not opengl coding so is not that much to work :D the problem is that i want to be copyed the lib and dll next to exe program how can i do that and there is a program like directx9.0c for opengl ??? and if it is …

Member Avatar for noyz
0
104
Member Avatar for dallin

I'm using visual studio .net c++ and I'm looking for the easiest code to drop the 0 on 0.233 to .233 when displaying floating point variable on screen. Thanks.

Member Avatar for BountyX
0
122
Member Avatar for shonenhype

Write a function IsoTriangle() that takes a size parameter and dispays an isoceles triangle with that many lines. Use the DrawBar() function as a basis. (Hint: Use another function Spaces() to display the leading spaces before the start of the asteriks on each line.) For example, the function call IsoTriangle(4) …

Member Avatar for Narue
0
150
Member Avatar for ANRCCC

I am trying and I don't know what to do. Attached is a aprogram and I don't know what is going wrong. :sad:

Member Avatar for Narue
0
104
Member Avatar for xplst

I've just downloaded the C++ sockets library from [url]www.alhem.net/Sockets[/url], but I can't get my programs to link -- I get a lot of "undefined reference"s.... I'm using g++ version 3.3.3. on Fedora Core 2 (kernel version 2.6.5-1.358). I can get the programs to compile (using the -c flag to g++), …

Member Avatar for grymse
0
2K
Member Avatar for ANRCCC

I fixed my program from the previous complaint and I got it to run. Now my problem is that it won't run correctly. Can you help me?

Member Avatar for frrossk
0
126
Member Avatar for dal4488

This is what I have so far and I can't figure out how to get the converted length in my output file so that 312 inches converts to 3 yards, 1 foot, and 3 inches. #include <iostream.h> #include <fstream.h> using namespace std; int main() { ofstream outfile; int centimeters; int …

Member Avatar for blackdove
0
102
Member Avatar for missy

#include <iostream> #include <string> #include <fstream> using namespace std; void main() { ifstream indata; ofstream outdata; char name [13][20]; float avg[20]; int sum=0, n, i=0, m,p; float davg; char ch; indata.open("a:nameFile.txt"); if(indata.fail()) { cout<<"file not open:"; exit (1); } while(i<=20) { for (i=0;i<20;i++) indata.getline(name[i],20); } for (int k=1; k<=3; k++) …

Member Avatar for Narue
0
113
Member Avatar for roscioeak@direc

Can anyone direct me where to go for doing stacks in C++. I have to make a program using stacks but can you initialize a stack with given values? If so can you give an example?

Member Avatar for vegaseat
0
100
Member Avatar for xsxixtxhx

I have a project that i am working on and i can't get how to get it to work. I have attached the .h and the main cpp file. If any one can be of help please reply or im me at xsxixtxhx on Instant messenger. I need to get …

Member Avatar for kc0arf
0
234
Member Avatar for MAD_DOG

Is there any books you guys know of that someone like me that dont know anything about programming can use C++/VB what ever something that is quick and easy to understand. Something really simple something you guys can recommand. Thanks again

Member Avatar for bombe
0
394
Member Avatar for odee

is it possible to create an array then you pass it to a function? That function will change the values in the array then return it back as an array.

Member Avatar for Dave Sinkula
0
118
Member Avatar for Dani

I am taking a Computer Graphics course where we are doing some c++ programming using the OpenGL API. I'm writing a C++ program in Visual Studio.NET, where I've installed GLUT (Open GL Utility Toolkit). OpenGL, itself, apparently comes with VS. The only include that I have in my one-file program …

Member Avatar for Intel
0
1K
Member Avatar for notdumb

I was attempting to initilize bool done to false, then have this program continue to give the user the option to do more check balance functions util they pressed exit, however, my program continues to cycle repeatedly, even after option 5 (EXIT) is entered. Please, some help on how to …

Member Avatar for notdumb
0
170

The End.