48,986 Topics

Member Avatar for
Member Avatar for anbuninja

so im working on my assignment and it says Percentage of ticket revenue which goes to administrative costs. This input will be entered in percent format (see sample runs below); your program must convert this to a decimal fraction. For example, the user enters 25% as 25, not .25; you …

Member Avatar for anbuninja
0
137
Member Avatar for slayman89

Thank you in advance, i have starred at this for a couple hours now and i have come to no conclusions. First off, this is an assignment to teach us how to use header files, this is the header that we were provided with: Complex.h [code=syntax] #ifndef Complex_H #define Complex_h …

Member Avatar for slayman89
0
98
Member Avatar for BINDERJ2

[code]#include <iostream> #include <iomanip> #include <cstring> using namespace std; int main() { char name[40]; double date1; double date2; double date3; double h1; double h2; double h3; // Name of pole vaulter cout << "What is the name of the pole vaulter? "; cin.getline(name,40); // Month1, Vault1 cout << "What was …

Member Avatar for BINDERJ2
0
111
Member Avatar for #include<DAN.h>

I was just wondering if there was another way to out put text besides cout? I know this probablt sounds weird because cout works perfectly fine and stuff, but I just want to know if all of the input/output has to be done in a cprompt window? Dose anyone know …

Member Avatar for Duoas
0
5K
Member Avatar for Dr_Pepper

Hello, my question is how can I read decimal from txt file? For Example expression "2.0 1.3 +" - postfix to calculate it. The one that I have right now work for integers but when it starts reading it chops of the decimal part. I can figure out what i …

Member Avatar for ArkM
0
126
Member Avatar for Gary_nel

Hi , As posted on a previous tread , i am very new to this whole programming thing...(just starting out) I am trying to write a small program to copy folders and every thing in it to a different location? The Platform is Wince .net (4.2 embedded). I can create …

Member Avatar for Ancient Dragon
0
142
Member Avatar for cperepelitsa

I'm making minor adjustments to a sample program called [b]pdemo[/b] that comes with Dekang Lin's [b]minipar[/b] parser, but I'm having trouble compiling the darned thing without seeing a royal mess of "undefined reference" variables. I'm not particularly well-versed in C++ (I'm far better with higher-level languages), though, so I'm sorry …

Member Avatar for ArkM
0
148
Member Avatar for Sky Diploma

[code=cplusplus] string countx(string sky) { int count=0; for(int x=0;x<=sky.size();x++) { if(sky[x]=='x') { sky.erase(x); ++count; } } stringstream ins; string bang; // Declare an input string stream. cout<<"count " <<count; ins << count; bang = ins.str(); sky=sky+"x^"+ bang; cout<<"Sky == "<<sky<<"\n"; return sky; } [/code] Writing a function that will take …

Member Avatar for Sky Diploma
0
95
Member Avatar for Jennifer84

When reading a txt file I am using .seekg to set the startpoint in the file to read from. linepos has a value: 1002106 First I wonder what this value stands for excatly. As I have understand this is how many characters forward in the file that will be the …

Member Avatar for Jennifer84
0
308
Member Avatar for chococrack

[code] void myClass<temp_Type>::myFunction(myClass<temp_Type>* &firstClass, myClass<temp_Type>* secondClass) { } [call] myFunction(*this, &secondClass); [/code] I think I am fundamentally challenged on the "this" qualifier. I want to pass a pointer to the current object(ie the object I am calling the function from), but am stuck trying to pass the "this". Are there …

Member Avatar for Narue
0
167
Member Avatar for jeevsmyd

Hiii I m just a beginner in C++...Was using turbo c++v3.0... Now just installed Visual c++ 2008 express edition.... Anyone please let me know the main differences between TC++ and VC++?.... how can i make a simple programme written in tc++ run in vc++..which are the modifications?... ".H" could be …

Member Avatar for Narue
0
169
Member Avatar for ShadowOfBlood

As a homework assignment, I was asked to write a program in C++ that calculates the sum of the even and odd integers in a list of integers given by the user. I think I'm on the right track, but I can't seem to get my loop right. Here's what …

Member Avatar for ShadowOfBlood
0
2K
Member Avatar for DevC++4.9.9.2

I am stuck, im trying to insert and print out this list of numbers from a file, however i just get an infinite loop every time... any suggestions? [code=c++] // This is the implementation file for class List #include <iostream> #include <stddef.h> // to access NULL #include "List.h" #include<fstream.h> using …

Member Avatar for DevC++4.9.9.2
0
155
Member Avatar for Rachmaninov

I made the game Mastermind using C++ and would like anyone who wants to test it and let me know what they think. It comes with instructions, but since I wrote them and I know how to play the game, they might not be clear. Note: If this post is …

Member Avatar for VernonDozier
0
5K
Member Avatar for ApMignonne

I'm trying to make a program that will read names and numbers from a file, but I'm quite inexperienced in C++ in general, and most tutorials and help threads I read tend to make me confused. So far, I have used a test file with a text like "NameA 01234 …

Member Avatar for ApMignonne
0
104
Member Avatar for c++ prog

this code is a game that uses socket to be able to connect to each other so that there would be a 2player game.. but there something wrong here...here's the code..i'm using linux as my operating system ..this is the client side.. [CODE]#include <stdio.h> #include <iostream> //#include <conio.h> #include <stdio.h> …

Member Avatar for Salem
0
82
Member Avatar for terme22

How do i get it to cout what the pointer points to and not the pointer address? [code] int main() { Item* items[10]; items[0] = new Item(5); items[1] = new Item(3); items[2] = new Item(4); items[3] = new Item(9); items[4] = new Item(2); items[5] = new Item(0); items[6] = new …

Member Avatar for chococrack
0
121
Member Avatar for Geard2

I was wondering in a doubly linked list how do check to see if the initial list you have is Null? This what I have (would this be correct): [code] node *middleOut(struct node*LL) { node *current = LL; if(current == NULL) { cout<<"empty list"; } //Rest of code is down …

Member Avatar for Bhoot
0
29
Member Avatar for sunveer

the below code is to allow user to enter many strings of characters until he enters a fullstop (.) Please tell me how can i calculate the total number of strings the user has entered. #include <iostream> void main() { char a[80]; int i,c=0; for(i=0;;i++) { cin>>a[i]; if(a[i]=='.') break; } …

Member Avatar for bhoot_jb
0
122
Member Avatar for STUDENT#101

hi all! how do I multipluy values inside the array I have tied the following but the compiler is giving me a error double a=(h[0]*b[1])+......

Member Avatar for Freaky_Chris
0
114
Member Avatar for StephanJos

Hi! Can anybody please help me to add many strings in one? I tryied this int a=4,b=5,c=6; string d; d = #a+" Hello "+#b+" bye "+c; I want that d = 4 Hello 5 bye 6 Please help me!

Member Avatar for Ancient Dragon
0
186
Member Avatar for core2d

I have this problem where you have a list of odd or even number of items in doubly link list and you have delete the middle one. For the even number one you delete the two middle elements, say you have 1,2,3,...,10 you delete 5 and 6, and for the …

Member Avatar for Sky Diploma
0
129
Member Avatar for ae012

hello! im trying to make a program where entered values should be displayed in a tabulated form. however, as far as i know, everytime we enter a value and press ENTER, the cursor goes to the next line. is there any way where in if a user enters a value …

Member Avatar for ae012
0
88
Member Avatar for jeevsmyd

hii friends..Am new to this community... am a computer science student... I need your help in creating a small c++ game... Its a project for me... I am told to do it in turbo c++... okay... the game is so simple... [U][I][B]A number memory game... random numbers should be displayed …

Member Avatar for Sci@phy
0
624
Member Avatar for shiniboy

[code=cplusplus] #include <iostream> #include <iomanip> #define _USE_MATH_DEFINES #include <cmath> using namespace std; double meanOf3(double value1, double value2, double value3) { double mean; mean = (value1 + value2 + value3)/3; return (mean); } int main() { float value1, value2, value3; double mean; mean=0; cout <<"Enter the first integer whose square root …

Member Avatar for Sky Diploma
0
135
Member Avatar for monogana

hi all, here is a question - all files on windows have certain attributes - readOnly, Archive ect.... how can i add my own custom attributes - Note - i dont want an interface to use them just to be able to get and set them within a c++ program …

0
58
Member Avatar for nomarhere

i need help with a homework problem, it's writing a program that approximates the sum of 1 + x/1! + (x^2)/2! + (x^3)/3! + ... + (x^n)/n! we're supposed to write a program that takes a value x as input and outputs this sum for n taken to be each …

Member Avatar for grumpier
0
83
Member Avatar for unk45

im supposed to create an address book and so far have gone as far as getting the input..my problem now is the highlighted section..i have to return bak the info put in initially by the user (first, last name and address), based upon a question to the user to input …

Member Avatar for stilllearning
0
227
Member Avatar for CPPRULZ

I tried to make a simple function that takes an array parameter and outputs it and it keeps giving me th error: \function test.cpp(12) : error C2664: 'func' : cannot convert parameter 1 from 'int' to 'int []' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast …

Member Avatar for vidit_X
0
236
Member Avatar for Geard2

I am new to link list and I have this problem where you have two lists. One list pointed by HEAD has a list of numbers in it, and the second list pointed by LARGE that contains the highest element(s) in the list pointed by HEAD. Each element has three …

Member Avatar for stilllearning
0
111

The End.