48,985 Topics

Member Avatar for
Member Avatar for coolmel55

Here is a link to the actual assignment [url]http://bluehawk.monmouth.edu/~rscherl/Classes/CS503/hw2.pdf[/url]. At this point I am able to build the linked list from a users input string as well as display that list. Here is the code that I have up to this point. I have two classes a Node class and …

0
88
Member Avatar for gwenny

I need help writing a program using a character Queue. I am using the Queue to determine if the two sequences of characters are the same as each other. Also I have to implement my character Queue as a linked list (using Nodes). Can anyone out there help me write …

Member Avatar for Narue
0
137
Member Avatar for laura_cornel

Hello, I am trying to code an eVC++ programm on scanning barcodes. My problem is that each time I scan in an Edit type field, there only the first character of the barcode who is scanned. Meantime, if I try to scan anything in Notes (for instance), all the code …

0
104
Member Avatar for Young Teck 06

A bit excited here people, just completed my first (well from the book) C++ script code. Its a Temperature Converting code from the C++ for Dummies book. Unfortunately, I haven't even made it through the first chapter and am having problems with the reading. So i need to ask a …

Member Avatar for Young Teck 06
0
107
Member Avatar for pratima

i must write a program that reads a number between 1 and 100 then calls a function to check if the number is part of the Fibonacci series.the main should display if the number is part of thr Fibonacci series.thanks #include<iostream.h> #include<conio.h> int check_fib(int a) {char ans1,ans2,ans; int sum,x,i; sum=0; …

Member Avatar for Narue
0
135
Member Avatar for KittyGirl

I have to write code that will prompt you to input a sentence, then it will output the number of vowels in the sentence. This is what I have so far. Can someone tell me what is wrong with it? Thanks so much! [code] //Input a sentence, then return number …

Member Avatar for Narue
0
130
Member Avatar for pratima

:rolleyes: i have to write a program which ask the user the height of a pyramid between 1 and 15 and displays a pyramid of this height made up of "*" characters on screen.for example how high would you like the pyramid?:37 pick another height(must be between 1 and 15):6 …

Member Avatar for Narue
0
119
Member Avatar for confusedmind

hi i am having trouble understanding that what is the difference between having class xxx { } in the .h file and not having it? say i have these two code, can anyone tell me the difference? [CODE] #ifndef sample_h #define sample_h class sample { function1 (); function2 (); }; …

Member Avatar for Ejaz
0
138
Member Avatar for kwongchungying

hello, i posted a thread before but i attached files so i guess it's too much trouble, i wish somebody can help me coz i have spent more than 5 hrs just to compile a very simple program, i have tried visual c ++ 6.0, g++ and gcc all have …

Member Avatar for Narue
0
897
Member Avatar for Asif_NSU

I had been using old turbo C++ compiler and with i had the help files on C++. However, the documents with my old version of turbo c++ is quite obsolete now. I want to get the latest docs so that i can look up specific function and class details with …

Member Avatar for vegaseat
0
245
Member Avatar for prathys

hello guys, I came across a strange thing when doing program in c++ in visualc++ environment.just run this code and after entering the array elements press up arrow and down arrow. Here's the code #include<iostream.h> void main() { int arr[5]; cout<<"Enter the array elements : "<<endl; for(int i=0;i<5;i++) cin>>arr[i]; cout<<"\n\n"; …

Member Avatar for Asif_NSU
0
134
Member Avatar for hill0ster

Narue, thanks for all your help with this program! I really appreciate it. I have one last problem. In the function tryAgain, if user presses 'q' or 'Q'; the program terminates. No problem there, but if they hit anyother key; the program should allow them to re-enter pyrllSt (payroll status …

Member Avatar for iumair
0
123
Member Avatar for JBazil

ok heres the deal... i took a C++ class as an undergrad WAAAAAY back in the day and have forgot almost all of it. i recently DLed a C++ program that came with several files. i have tried to run this program to see if i obtain the same results …

Member Avatar for JBazil
0
214
Member Avatar for confusedmind

ok, here are the questions. QUESTION NO. 1: I am asked to build a complete binary tree using linked list. According to my knowledge, you are not able to sort the tree with a complete binary tree otherwise it is impossible to get it complete. I searched thru google and …

Member Avatar for confusedmind
0
1K
Member Avatar for aminura

Hi.. I have to make a program in c++ for plotting a sine curve..using arrays ..taking x axis in horizontal direction and y axis in vertical direction... Please help me out in making this program :) thanks

Member Avatar for alc6379
0
106
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
125
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
95
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
147
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
252
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
94
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
314
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
139
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
135
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

The End.