49,761 Topics

Member Avatar for
Member Avatar for Gerlan

Alright so here is the jist I need to make a programm that inputs a number and checks if the number entered is a prime number. I got the programm to work (without pointers) but the requirement is i HAVE to use pointers. I read up on points, did the …

Member Avatar for Ancient Dragon
0
105
Member Avatar for Moporho

I have assignment and need help determining if I am correct. The question reads: a.Write a function that determines whether a number is prime b.use the function to determine and print out all prime numbers between 2 and 10,000. [B][U]How many numbers to you have to test before being sure …

Member Avatar for Moporho
0
5K
Member Avatar for arlene1

I'm extremely new to c++- this is a homework question- I do not understand how to write my program for this problem: Write a function named yrCalc() that has an interger parameter representing the total number of days since the turn of the last century (1/1/1900) and reference parameters named …

Member Avatar for amitahlawat20
0
177
Member Avatar for bugmenot

hi, i need help please... i need to write a program to calculate the depreciation of equipment passed its useful life using two different methods... these are the actual requirements for the program: "Depreciation" Program requirements: 1) write a c++ program to calculate depreciation using the straight-line and sum-of-digits methods. …

Member Avatar for Lerner
0
784
Member Avatar for Jennifer84

I have a .txt file that contains this informaton: Numb1 Number2[1] Numb3 Now there is 2 things that I am trying to do here. I dont know how to begin this. First I will search if there is any Word in this file that is named: Number2[1] But the tricky …

Member Avatar for Jennifer84
0
165
Member Avatar for ssharp77

Received some prior help to clean up my code and get this to compile which, it does in fact compile, but it seems to end after the int main(). I have tried several other possibilities with moving code around for the various functions, and I still cannot seem to get …

Member Avatar for ssharp77
0
551
Member Avatar for wannabeIT

I don't understand why this program is making me input two more times (after the program is finished) before it terminates. All other programs that I do usually terminates while this code idles. For those who are confused, I have to enter extra characters and hit "enter," twice before the …

Member Avatar for Lerner
0
119
Member Avatar for guitarrick

I really hope someone can help with this...We've been working on the same 'core' abstract data type files (ListA.h & ListA.cpp) thus far this semester. Progressively adding different methods along with the new concepts introduced. AppointmentBook is our class, and each project calls for some implementation of a simulated appointment …

Member Avatar for guitarrick
0
122
Member Avatar for Allen 0108

In the code below, can someone explain how the incrementing for the successive iterations results in the output? Thanks. [CODE]int main() { using namespace std; for (int i = 0; i < 3; i++) for (int j = 0; j < 3; j++) cout << i << " " << …

Member Avatar for Allen 0108
0
219
Member Avatar for Sadaf Masroor

ihello, i am doing to print the no of multiplies using for loop but it print only last no i.e if i give no is 2 then after multiplication it prints 20.i want to print all multiplies. the for loop code is for (i=0;i<=n;i++) int no; no=n*ii; } for (i=0;i<=n;i++) …

Member Avatar for Sky Diploma
0
83
Member Avatar for Jennifer84

I am trying to find how to open a Native project in VC++ 2008 NET That has this: int main() like below but I cant find what is the name of this project. int main() { return 0; }

Member Avatar for Narue
0
90
Member Avatar for fluidtype

Hello again. Now I'm asked to replace the texts in an existing software (Compiled with Visual). Like "Welcome to...." some remove a block of text entirely. I replaced all the images and icons before. Any ideas? Cheers!

Member Avatar for vijayan121
0
128
Member Avatar for jeffige

I am taking a course on C++ game dev and one of the exercises asks me to write a program that: asks the user to input two numbers. compute those numbers, +, -, *, %. and then display the results. It took me forever and a minute, but I got …

Member Avatar for jeffige
0
266
Member Avatar for digital_ice7

i'm working on a banking system.....m stuck here....i dont know how to do this: 1.Their account should already have an amount of money for further processing. 2.All users are able to perform transactions such as withdrawal, deposit and check balance etc. 3.Each user will have a file or record to …

Member Avatar for mitrmkar
0
102
Member Avatar for w2s

am trying to write a program which compute sin using an a equation instead of the function of sin in cmath libry. "the equation is like this Tn = (Tn-2 *(-1) *x*x)/ n*(n-1) [code=cplusplus] #include<iostream> #include<cmath> using namespace std; int main() { int factorial(int); int n =1, i = 1; …

Member Avatar for Ancient Dragon
0
98
Member Avatar for Yaka

hi, this is my prime number check program, i've posted it here b4, thanks to ur helpfull replys i managed to get it up and running how ever it gives this warning....C4715: 'isPrime' : not all control paths return a value....i cant figureout where the error is. could someone tell …

Member Avatar for mitrmkar
0
328
Member Avatar for henpecked1

I'm trying to write a while loop to terminate a program when asked if you want to enter another name and the answer is no (or a number since I'm using character strings) My first idea was to check the 0 element of the first name part asked for, but …

Member Avatar for henpecked1
0
190
Member Avatar for rohoni
Member Avatar for amitahlawat20
0
104
Member Avatar for badboydrix

I am a sutdent of SVGCC and i am writing a simple encryption code but I am lost on how to start. I know i have to use i/O files to open the code but i cannot find on the net a way to edit the information to aid me …

Member Avatar for vmanes
0
65
Member Avatar for mr.cool

im making a battleship game and so far i have this but im getting an error and i don't know what it means, this is the error [inlinecode]error C2664: 'strcpy' : cannot convert parameter 1 from 'char' to 'char *'[/inlinecode] this is my code [code=cplusplus] #include <iostream.h> #include <stdlib.h> #include …

Member Avatar for mr.cool
0
115
Member Avatar for WIP

I tried them but i cant seem to get them to compile so it would be really nice if you can try them and let me know where i went wrong! here are the question: (Airline Reservations System) A small airline has just purchased a computer for its new automated …

Member Avatar for Ancient Dragon
0
382
Member Avatar for digi-girl

I know I'm not the best with functions in C++ and that's probally why I'm having problems, but anyways I keep getting these errors: [linker error] undefined reference to 'Area(float,float)' [linker error] undefined reference to 'Circumference(float,float)' [linker error] undefined reference to 'Diameter(float,float)' I also get a message that says: Id …

Member Avatar for Ancient Dragon
0
124
Member Avatar for Azurea

Hi there. I'm pretty beginner at functions, and I would like to know if it's possible to have a parameter of a function that takes multiple arguments. Like in Python, you could have [CODE=python] >>> def a(*args): print args >>> a(1, 2, 3, 4, 5, 6) (1, 2, 3, 4, …

Member Avatar for Ancient Dragon
0
100
Member Avatar for dallaseve

[QUOTE]Hi, how do I get rid of a conversion from double to float warning??[/QUOTE] Thanks

Member Avatar for dallaseve
0
72
Member Avatar for Uso

[CODE]#include <iostream> #include <fstream> #include <string> using namespace std; struct TsuPod //First letter capitalized just like in adobe reader file. { string title; string artist; int size; } //////////////////////////////// /* FUNCTION - void initTsuPod Initialize all the slots to blank and 0 size memory. input parms - none. output parms …

Member Avatar for Uso
0
78
Member Avatar for henpecked1

I'm trying to calculate the length of three individual arrays and plug that length into a function to dynamically allocate memory to a new array and delete it. I keep overwriting my HEAP and I'm not sure where the problem is [code] void punchmeinthehead() { const int maxin = 16; …

Member Avatar for henpecked1
0
136
Member Avatar for amitahlawat20

could any one tell me the exact syntax and semantics of cin.get() and cin.ignore() ?

Member Avatar for henpecked1
0
81
Member Avatar for amitahlawat20

#include<iostream.h> class A { int avar; public: A() { avar=0; } A(int a) { avar=a; } void dis() { cout<<endl<<"avar = "<<avar; } void operator ++ (); }; void A::operator ++ () /*[B][U] from compilation message it is known that this is prefix form , how do I specify the …

Member Avatar for sarehu
0
77
Member Avatar for novice420

This is just a school level program and I am a C++ n00b. So I would be grateful to people helping me out with this if there is any solution. CAN I TERMINATE A STRING ENTERED BY --getch();-- WHEN I PRESS THE <ENTER> KEY ?? SEE THE PROGRAM BELOW WHERE …

Member Avatar for Majestics
0
88
Member Avatar for bhoot_jb

heyy friends.. i m a beginner in C++ and am currently workin wid a program.. just for clrscr(), i have to include the whole conio.h file in my program inorder to clear the screen.. so is there any alternative to clrscr()?? please throw some light on this topic.. :)

Member Avatar for Majestics
0
3K

The End.