49,757 Topics

Member Avatar for
Member Avatar for bryangino20

question is: Give 5 type checks that should be made for the following c++ statement: x=f(v[i]); NOTE: assume x, f,v and i are all declared and in scope. 1. compatibility check (compile time) 2. v[i] is a valid array element. (compile time) (i.e. (i is not a float or something)) …

Member Avatar for mike_2000_17
0
492
Member Avatar for zeppelyn

I'm nearly complete in figuring out this program, but for some odd reason, my program will either output "segmentation fault" or a "floating point exception" when it attempts to evaluate the postfix expression. The objective of the program is to take in an infix expression, convert it to postfix, then …

Member Avatar for Ancient Dragon
0
641
Member Avatar for vicky30312

I had to make a program that calculates how much you gain or loose in a stock markect. I have everything worked out excpet how to use char. I've looked it up but i don't understand anything. Can you help explain it to me? // Project 6.4. Calculates how much …

Member Avatar for vicky30312
0
242
Member Avatar for ilvanhellovan

i have a problem conversion from char to LPTSTR as parameter, could anyone help me,, for example char temp[10]="abcde"; how convert to LPTSTR from char above?? thanks

Member Avatar for deceptikon
0
2K
Member Avatar for vicky30312

Same project as before but now I have diffrent Errors. fatal error C1075 and error C2450. //Project 7.4. Program determines what your weight would be on another planet.2.3. #include <iostream> #include <cmath> using namespace std; int EarthWeight ; int WeightOnPlanet, Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto ; int …

Member Avatar for vicky30312
0
448
Member Avatar for jimmy.teohmingsiong

#include<iostream> #include<iomanip> using namespace std; class circleType { public: void setRadius(double cRadius); double getRadius() ; double calcArea() ; double calcCir() ; void print() ; circleType (); circleType(double cRradius); private: double radius; }; void circleType::setRadius(double cRadius) { radius = cRadius; } void circleType::print() { cout << "The radius of the circle …

Member Avatar for np complete
0
472
Member Avatar for farah.hany.31

I'm trying to display the pegs of the Hanoi Towers recursive algorithm. I want each step to appear separately as such: For example if the number of disks is 2 A: 2 1 B: C: ---------- Move disk 1 from A to B A: 2 B: 1 C: ---------- Move …

Member Avatar for WaltP
0
92
Member Avatar for meby mathew

the program is to print a bill using two classes-customer and item.... in class customer, members are itemname and customer name.in item, members are itemname itemcode,itemprice,noof items...and functions to calculate bill and update stock. iam in confusion with the logic.....i think that it can be done by using nested class???

Member Avatar for gusano79
0
103
Member Avatar for RonKevin

PART 1 of my Project:Using turbo c++ 4.5, and I'm very new to Programming, i'm not good 1. I made a program which stores 100 records please check if it's right. 2. I want to read each line into an array. I want to use a struct or what they …

Member Avatar for WaltP
0
145
Member Avatar for mkaynutty

So I'm trying to right a code to output some simple data using classes. Everything works accept the retail price function. It's suppose to calculate and output the retail price but it only outputs 0 no matter what numbers I eneter. Can anyone give me some suggestions on how to …

Member Avatar for Ancient Dragon
0
181
Member Avatar for ii.love.o5

**Hello :) can somebody help me how to put the quantity and adding a receipt also the a1, a2, a3, a4 (for example i chose the a1 and it will ask me how many order and do you want to order more? if not it will go to the payment …

Member Avatar for ii.love.o5
0
1K
Member Avatar for chris.vargas.773

i need some help/ having trouble in making this program for homework: Create a C++ program which calculates student fees for those attending Santa Monica College. IN ORDER TO RECEIVE FULL CREDIT, YOU MUST CREATE FUNCTIONS TO SOLVE THIS PROBLEM WITH BOTH PASS-BY-VALUE AND PASS-BY-REFERENCE PARAMETER (No, main() doesn't count). …

Member Avatar for np complete
0
192
Member Avatar for DelilahDemented

I have an array of structs that contains an account number and a balance. I open a file which contains an account number and an amount that needs to be either added or subracted from the correct account. My problem is it is adding and subracting to the first account …

Member Avatar for np complete
0
166
Member Avatar for RonKevin

0001 Bread Bakery 35.00 0002 Soap Hygiene 20.00 0003 Milk Dairy 40.00 0004 Apples Fruit 30.00 0005 Gelatin Snacks 15.00 0006 Candy Snacks 25.00 0007 Catsup Condiments 40.00 and so im trying to read this grocery.txt file...i'm thinking of using an array...the code ive done would read the first line …

Member Avatar for RonKevin
0
317
Member Avatar for charuwaka

in my college we are runnig c++ by creating a directory from cmd and this commands goes like this cd\ cd rollno set path=c:\tc\bin tc this created dir in c folder and also saves our pgms with our roll no so what i want is iwant to implement it in …

0
59
Member Avatar for linabeb

if im doing a dll in dev c++ ..... and doing a dll in c++ but using visual studio 2010 is both of them gonna be the same?? i mean..ermm..if the computer doesnt have the visual studio will they be able to run my dll project which using c++ language... …

Member Avatar for linabeb
0
291
Member Avatar for tmoran1016

I have a project to create a pointer based linked list. I am having a problem with the contains() indexOf() and lastIndexOf() methods. I am not able to compare iter->item!=o. This is my ArrayList.cpp. I will follow it with ArrayList.h and Country.h (the ArrayList uses a typedef of the Country …

Member Avatar for vijayan121
0
185
Member Avatar for jongiambi

I am trying to implement a function sameMonth from a class to compare two user entered months. My class is declared in a header file "Date.h": #include <iostream> using namespace std; class Date { private: string month; int day; int year; public: Date(); Date(string aMonth, int aDay, int aYear); void …

Member Avatar for vijayan121
0
285
Member Avatar for jongiambi

Can anyone help me with this constructor problem? In main: instantiate one date object (date1) using the default constructor just to see that the constructor works, print the month, day, and year of date1 using the getters get input from the user and use the setters to set the values …

Member Avatar for jongiambi
0
403
Member Avatar for blaisemcrowly

Hi guys I been programming in c++ for past 2 years and is fairly good with it. First of all I dont need the code or anything but need some resources which i can use to get the basic idea so I can start developing. Had been googling for the …

Member Avatar for rubberman
0
1K
Member Avatar for marius2010

So I'm beginner starting software enginering studies here condition: Given number n ( n<=9999) need to identify if this n is palindrom(ex. 7777,8228,0220...). Need to write in c++ language.thanks

Member Avatar for WaltP
0
362
Member Avatar for demingd

im writing a program that creates a dynamic array then input numbers(not exceeding 100). i used *new int* to create the array. im running into the problem that it only allows 21 numbers to be entered, then does sort,mean. could anyone explain where im going wrong setting up the array …

Member Avatar for WaltP
0
227
Member Avatar for triumphost

I had absolutely no clue where to post this but I figured since it crashes on the C++ side, I'd ask here. I have the following code: Java side (Loads My C++ DLL just fine.. Passes it a ByteBuffer so that I can write to that): import java.io.IOException; import java.awt.*; …

Member Avatar for triumphost
0
397
Member Avatar for Stpdoug

How can i draw a 1 line border or frame around code using an " * " , searching the net i have seen techniques using loops and various functions but i cant grasp the concepts being used, even a link to a indept tut on this would be a …

Member Avatar for Stpdoug
0
2K
Member Avatar for 88GzPopLock88

... The name of program is i think it is function and structured programming waa hard to explain ahmm.. if you input a number 1 temperature must be goes in program then after that i need to input an exit like "ARE YOU SURE YOU WANT TO EXIT?" then Y …

Member Avatar for Ancient Dragon
0
309
Member Avatar for 88GzPopLock88

![homework2](/attachments/large/3/homework2.png "homework2") ![homework3](/attachments/large/3/homework3.png "homework3") ![homework4](/attachments/large/3/homework4.png "homework4") ![homework](/attachments/large/3/homework.png "homework") The name of program is i think it is function and structured programming waa hard to explain ahmm.. if you input a number 1 temperature must be goes in program then after that i need to input an exit like "ARE YOU …

Member Avatar for Ancient Dragon
0
280
Member Avatar for DelilahDemented

I think I am getting bad data because I have my pointer doing the wrong thing, I just don't know exactly how to fix it. Any help is greatly appreciated! output: Number: 4669840 Name: Value: 3.76441e-039 Number: 4218312 Name: Value: 6.52879e-039 Number: 2686408 Name: Value: 6.52879e-039 Number: 128 Name: Value: …

Member Avatar for DelilahDemented
0
211
Member Avatar for Grandiago

Hey! I have a problen. I'm a user of Turbo C++ yes, it's outdated. I know. LOL SO anyway, i'm supposed to create a program that reads a text document when ran. so I already have the text document named test.txt located on my desktop. but when i try to …

Member Avatar for WaltP
0
165
Member Avatar for klharding2

Hello, I'm trying to calculate factorials with my program, but it is only working for the first few numbers. It compiles fine, so I can't find the problem. Help please! Keep it simple, I am very new to C++ and programming in general. Here is my code: #include <iostream> #include …

Member Avatar for WaltP
0
90
Member Avatar for RonKevin

Hello I'm back guys! @npcomplete....can't do anything about it dude, its what we use in our school...and Im from the Philippines...when I master this compiler, i'll switch.. So here it is my work so far...Record of 100 Buyers..Please check if I did it right..It worked for me so..yea.. #include<iostream.h> #include<cstring.h> …

Member Avatar for WaltP
0
196

The End.