49,761 Topics

Member Avatar for
Member Avatar for quasimof

I have an assignment where I am given a sequence and I must turn the user's input (int) into that sequence. For example: number : 2 The sequence starting at 2 is : 2 4 16 37 58 The sequence is: 2^2=4, 4^2=16, 1^2+6^2=37, 3^2+7^2=58, etc.... how would I compute …

Member Avatar for quasimof
0
128
Member Avatar for tendekai
Member Avatar for vegaseat
0
189
Member Avatar for Nyika

I have 2 files: a .h file and a .cpp file. I am new to c++ but need to know how to execute these files. In other words, how do I write a 'main' so I can actually get an output to these 2 files. I am using Microsoft Visual …

Member Avatar for Nyika
0
97
Member Avatar for willow

Previous program being used, that works fine. I have tried placing my break statements in various places within the programming and cannot get it to run that specific triangle that was entered so that I can enter the letter 'q' to quit. Program is to execute continuously until the user …

Member Avatar for vegaseat
0
162
Member Avatar for ghoststriker7

okay i know how to use fstream and everything, but the prolem is that I want to use a variable in ithe open part. exp const. pretend all headers are included. It works like this { ... ifstream infile; infile.open("text.txt"); ... } but when I want to use a variable …

Member Avatar for ghoststriker7
0
159
Member Avatar for dcving

:?: how do I get the high-lighted lines below to round up to just two (2) decimal places using the `setprecision` // Program description: Calculate the price, including taxes, of a water bill // given the amount of water in gallons // Author: Eric Martin // Date: 10.21.2004 #include <iostream> …

Member Avatar for Stack Overflow
0
253
Member Avatar for clartsonly

does anyone know if you can use :bind variables through odbc and vc++ for oracle, so my sql stays in the sga.? if you do, I will send you an invisible prize... ;)

0
76
Member Avatar for dcving

how would i go about making a program similar to a bill? for instance (but a little neater than my example, but u get the idea): amount of blah used ----------------------------- 50000 blah amount of blah blah used ------------------------ 348790 blah blah amount of blaaah used -------------------------- 589284 blaaaaah _________________________________________________________ …

Member Avatar for confusedmind
0
95
Member Avatar for idicula

hey does anyone what these errors mean: ----------------------------------------------------------------- --------------------Configuration: a1 - Win32 Debug-------------------- Compiling... a1.cpp C:\Documents and Settings\Jinu\My Documents\Stuff\C++\Development\a1.cpp(46) : error C2146: syntax error : missing ';' before identifier 'bSq' C:\Documents and Settings\Jinu\My Documents\Stuff\C++\Development\a1.cpp(47) : error C2146: syntax error : missing ';' before identifier 'rightNum' C:\Documents and Settings\Jinu\My Documents\Stuff\C++\Development\a1.cpp(48) : …

Member Avatar for MoreCom
0
325
Member Avatar for sjopkg

I am a beginning programming student and was stumped on one of my programs. I really don't know where to begin on this one. I have to develop a MC++ program that will input the miles driven and gallons used (both as ints) for each tankful of gas. the program …

Member Avatar for Dave Sinkula
0
140
Member Avatar for gwenny

I'm trying to write a program using a stack to determine if the two sequences of characters are the mirror image of each other. Can anyone help me to get started?

Member Avatar for gwenny
0
173
Member Avatar for skamen

Hi, For class I have to write a program that performs mathematical operations onto fractions. I'm really drawing a blank as far as how to setup the function that reads the fractions inputed by the user. If you care to look the assignment can be found at: [url]http://www.cs.wmich.edu/~nelson/CS111FALL04/lab04/lab04.html[/url] The way …

Member Avatar for Narue
0
2K
Member Avatar for Sukhbir

what happened if we do't typecast return value of malloc like that int *a=malloc(10);

Member Avatar for Narue
0
139
Member Avatar for Memory Loss

Well, not so much difficulty, more like I am completely stumped! I've only been programming with c++ for a few weeks, yet I have found myself in the predicament of having a small, albeit difficult assignment to complete for university pretty soon. I was wondering if anyone could help me. …

0
75
Member Avatar for cblue

How do you count charcters in C++? for example if the user inputs 1234 the output would be 4 and -1234 the output would be 5. also if a user enters a numbers until a 0 is entered it outputs the nunmber of positive numbers entered and the number of …

Member Avatar for Dave Sinkula
0
102
Member Avatar for somer2412

Please help I am writing a program that calculates the mean and median of a sequence of integers. My program works fine as long as the array is odd. Can someone please help me with a statement to calculate the median when the array is even. I have included my …

Member Avatar for Dave Sinkula
0
391
Member Avatar for wangstarr

Hi, I am having some problems with a program I'm supposed to write: here is the program I am supposed to write: Write a modular program that uses a structure to store the following information about a customer account: Name Address City, state, and ZIP Telephone number Account Balance Date …

Member Avatar for Stack Overflow
0
148
Member Avatar for hejones

Here it is: Use functional decomposition to write a C++ program that takes a number in the range of 0 to 6 and a second number in the range of 1 to 366 as input. The first number represents the day of the week on which the year begins, where …

Member Avatar for Dave Sinkula
0
142
Member Avatar for wangstarr

Good evening all, I am now working on a project for my intro c++ course and I'm having alot of difficulty understanding how to make a class program. I've been looking over the text but I am still confused. I would really appreciate any suggestions, ideas , or ways to …

Member Avatar for Stack Overflow
0
360
Member Avatar for PcNerd_007

Does Anybody Have Any Good DC++ Hubs For Games If So Plz Msg Me.... :cheesy:

Member Avatar for PcNerd_007
-1
68
Member Avatar for wewe

Hi i have a problem linking upthe files main.cpp tree.cpp tree.h and list.ct really do not know how to complie with list.ct whats the ct ? anyway inside the list.ct, are templates. it reflect linking problem.. i.e. [Linker error] [B][I]undefined reference [/I] [/B] to `Tree::cleanUp()' [B] Question:[/B] what should i …

Member Avatar for wewe
0
119
Member Avatar for HollywoodTimms

Here is what I have #include <iostream.h> int main() { int i, total[3]; int myValue[3][3]; myValue[0][0] = 53,000; myValue[0][1] = 5; myValue[0][2] = 1; myValue[1][0] = 89,000; myValue[1][1] = 3; myValue[1][2] = 2; myValue[2][0] = 93,000; myValue[2][1] = 3; myValue[2][2] = 3; for (i = 0; i < 3; i++) …

Member Avatar for Ejaz
0
83
Member Avatar for hill0ster

If you type in employee ID, and then a character (other than s, h or c) including the enter key. You get a message that says, "Do you want to try again or quit?" "Type q or Q to quit any other key to continue." If you hit any other …

Member Avatar for Stack Overflow
0
239
Member Avatar for nicoletonyf

hello there, when I try to combine 2 arrays together it displays "0". I think I don't understand the concept of constant. This is my code: [code] #ifndef INTSET_H #define INTSET_H class IntegerSet { public: IntegerSet( int ); IntegerSet( const IntegerSet& ); IntegerSet unionOfIntegerSets( const IntegerSet& ); IntegerSet intersectionOfIntegerSets( const …

Member Avatar for Stack Overflow
0
129
Member Avatar for mohammad

hi i need help i install microsoft visual c++ 6.0 but if i compile any programme he write error spawing cl.exe plz help me coz i have exam and i need help plzzzzzzzzzzzzzzzzzzzzzzzzzzzz

Member Avatar for Dave Sinkula
0
83
Member Avatar for hopeolicious

This is my program but that I have to put it into structure form but without using member functions but i dont see how I can make it run #include <iostream.h> #include <string.h> #include <stdlib.h> #include <iomanip.h> struct hope() { int x; char st_name[25]; char st_address[75]; char st_color[25]; float f_ccost; …

Member Avatar for Stack Overflow
0
90
Member Avatar for hill0ster

If you type in employee ID, and then a character (other than s, h or c) including the enter key. You get a message that says, "Do you want to try again or quit?" "Type q or Q to quit any other key to continue." If you hit any other …

Member Avatar for Dave Sinkula
0
256
Member Avatar for the b

I'm making a program that takes the words from one text or data file and transferes it to another. there are not supposed to be any spaces in the second file. I need to know why I can't make this code work. It would not be the completed code but …

Member Avatar for the b
0
323
Member Avatar for rpglw18

ok im having this problem. i have a function in which i have to create a triangle using *'s. The user inputs the base and height of the triangle and from that im supposed to print out the shape. Ive been playing with for, and while loops and cant seem …

Member Avatar for rpglw18
0
44
Member Avatar for V5dave

I finally give up. I have here two very simple forms that (for demonstration purposes) consist of a single click button. When you click on the button, the form becomes invisible, and the other becomes visible. you can keep going back and forth till your coffee needs re-heating in the …

0
55

The End.