49,761 Topics

Member Avatar for
Member Avatar for KittyGirl

I'm writing a program that asks the user to input 3 numbers, then outputs the shape of the triangle. This is what I have so far, but it still doesn't work. Can someone help? Thanks! [CODE]#include <iostream> using namespace std; enum triangleType {scalene, isosceles, equilateral, noTriangle}; void triangleShape (int shape); …

Member Avatar for jwenting
0
189
Member Avatar for sridarravi

I am new to C++ and so how do i start my first programs. Can some one tell me what i need to do first. Also can someone send a free online C++ book?

Member Avatar for vegaseat
0
117
Member Avatar for dowens3rd

since no one replied to my first posting I am trying again. This time I was able to take a set length (4) number and sort its digits in order. Example make 5961 output 1659. Can anyone tell me how to do this without limiting the length of the number? …

Member Avatar for Dave Sinkula
0
145
Member Avatar for auronvi

Ok, I'm sitting here in my CIS class trying to figure out how to move words put in my character array. The program is, sorting the monthly rainfall in order from highest to lowest, organizing the months along with it. I have one array of ints and another character array. …

Member Avatar for auronvi
0
120
Member Avatar for cgre0205

I AM RUNNING A PROGRAM THAT DEALS WITH TEXT FILES IN NOTEPAD. I TYPE IN A FAKE SSN AND THE PROGRAM IS TO READ A LIST OF FILES FROM student course. I AM GETTING AN ERROR MESSAGE TELLING ME THAT PROGRAM CAN'T READ FILE. TWO EX OF SSN'S ARE 201235678 …

Member Avatar for alc6379
0
163
Member Avatar for rangers10

hi, just a quick question i have created a program to input 6 numbers, but the problem is that i need it to subract the highest and lowest numbers then add the remaining numbers left. im new to "c" and cant figure this out i just need someone to point …

Member Avatar for alc6379
0
160
Member Avatar for blacjuice

I need help with a printData function to output my code to an output file. Ive tried you can see one of my attempts commented out. [code] #include<fstream> #include <iostream> using namespace std; //functions void getData(ifstream& ,ofstream&, int temperature[2][12]); float avgerageHigh(int temperature[2][12]); float avgerageLow(int temperature[2][12]); int indexHighTemp(int temperature[2][12]); int indexLowTemp(int …

Member Avatar for anastacia
-1
56
Member Avatar for dowens3rd

I am being asked to take a number like 86249 and produce the output 24689. Basically take a number and print it in ordered form. I can do this with an array of multiple numbers, but can't figure out how to split the number entered into an array so this …

0
81
Member Avatar for jeannette1960

I need help with the source code that I am going to attach. I have all of the pieces but I cannot figure out to put the pieces together. I am to ( 1) have a display showing denominations of money accepted, total amount deposited, price of a soda, and …

Member Avatar for Dave Sinkula
0
228
Member Avatar for missy

i am trying to avg scores but i keep getting errors, can someone please help me. [code] #include "stdafx.h" #include <iostream> using namespace std; const int SIZE =3; int main() { int sum=0; int tests[SIZE]={0}; float average; char terminate; cout<<" Enter test1:"; cin>> tests[0]; cout<<"Enter test2:"; cin>> tests[1]; cout<<" Enter …

Member Avatar for vegaseat
0
118
Member Avatar for gallas

I have a silly problem. I want to make a class (let's call it Classone) that has an object that's an instance of Classtwo as an attribute. So far so good, but when Classtwo has an attribute that's an instance of Classone, I get a compilationerror. I would appreciate if …

Member Avatar for jwenting
0
197
Member Avatar for arrr matey

Me and my friend need to make a license plate generator program as a final project for our c++ class. We're trying to make it so it outputs 6 random numbers and letters. I'm gonna try to make it pick 6 random numbers between 0 and 35. If it is …

Member Avatar for arrr matey
0
90
Member Avatar for walljoshua

What does it mean if my program compiles but when I run it it says foating point exception (core dumped). Thanks for your help!!

Member Avatar for walljoshua
0
158
Member Avatar for aminura

I am learning C++ and I have done Pointers..but I am not able to understand it well. I know what is it but I am not able to understand exactly why do we use rather where do we use it. :confused: .basically it's the practical implication of it which I …

Member Avatar for Dave Sinkula
0
103
Member Avatar for SquirrelProdigy

Is reading and writing strings inside of structures possible, or must you use character arrays? Here's what I've tried; no compiler errors, but it doesn't display the text: [CODE]struct Account{ float balance; string Owner; }; int main(int argc, char *argv[]) { fstream File; Account Acc; int row; cout<<"Open or New? …

Member Avatar for SquirrelProdigy
0
141
Member Avatar for serfurj

can C programs use iostream? i've done it in C++, and read that it can be done in C, but i keep getting compilation errors. [CODE]#include <iostream> using namespace std; main() { cout << "test"; } [/CODE]

Member Avatar for jwenting
0
139
Member Avatar for far

I need some help: how can I do this: Write a program to find out how many terms of the series: 1 + 1/2 + 1/3 + 1/4 +.... are needed before the total first exceeds 5.

Member Avatar for anastacia
0
159
Member Avatar for sachin kumar

can anyone help me in reading the file names from a folder with a specific extention in VC++ enviroment. thanks in advance sachin

Member Avatar for britt_boy
0
76
Member Avatar for jasweb2002

I am writing a program that will build a graph and then find the lowest costs between any given vertices. I have the program building the graph just fine, but now I just started to write the part that will find lowest costs and I get a seg fault error. …

Member Avatar for Dave Sinkula
0
250
Member Avatar for see_moonlight

How can i find out the Max and Min value from a Vector, what's the function can i use to do that? max_find() e.g. double x[]; double x_max; double x_min; x_max = max_find( x ); x_min = min_find ( x ) ;

Member Avatar for britt_boy
0
879
Member Avatar for fivetoesonefoot

hey ya'll i've made this code (simple, bc that's what i am) and i think it would work except for the tiny problem that i always get the error that the switch statement is illegal, but i don't know what to put instead (when i do run the program, it …

Member Avatar for britt_boy
0
88
Member Avatar for badchick

Hello People, I need help because i just need to figure out whats wrong with the code i wrote for my program.. i tried to figure it out but i'm stuck. So here it is and i would appreciate it if someone can set me strait. Thanx alot. Well here …

Member Avatar for britt_boy
-1
155
Member Avatar for JimJake

I have built a SDI project in Visual C++ called HelloSDI. I used a book I bought to learn about Windows applications. The project compiles 0 errors and 0 warnings. The project has a simple dialog box added to it. When I run the program up pops a window that …

Member Avatar for steveh
0
141
Member Avatar for Extreme

hi all....I need help with a pragram which i wrote .....Itz to check if a number is palindrome or not using a function...i.e. the program will ask the user to input any number....then if u reverse the number it will give u the same old number then it is a …

Member Avatar for jwenting
-1
261
Member Avatar for lida1984

HI plz help me to write my program in c++ which it has the name of for example lida.COM and it just cout a text such az my name or ... u knew i could write many program in c++ but this time i waana change the format of the …

Member Avatar for alc6379
0
130
Member Avatar for smartintelleng

I go to make my program and I get those warnings. I know that they are linked to the exceptions my program throws during execution which terminates my program another godamn debug error. The problem is that when I double click on the warning, it brings me into the complicated …

Member Avatar for Dave Sinkula
0
195
Member Avatar for jasweb2002

I need to set a variable to infinity or the highest possible number for the computer. But I have no idea how to do this. I did this a little while dabbling in assembly but I am unsure how to do this in C++. Thanks.

Member Avatar for Dave Sinkula
0
106
Member Avatar for Reagan

I am working on a time card program in Visual C++ (FYI: I am VERY new to this, so, please, be gentle with me) :) It compiles with 0 errors and 0 warnings, but when it executes I get an error message that the program needs to close. When I …

Member Avatar for Reagan
0
525
Member Avatar for Bob

[B]Intro[/B] [i]This tutorial provides a brief introduction to C++ data types.[/i] [b]What is a data type? [/b] When we wish to store data in a C++ program, such as a whole number or a character, we have to tell the compiler which type of data we want to store. The …

Member Avatar for 1o0oBhP
0
2K
Member Avatar for C++Newbie

Hello, This is my first post. Anyway.. I am having trouble with my c++ program. My assignment is to read from a file a 2-Dimensional array. However, when attempting to do so with my code, which i'm guessing is faulty, I keep getting this error while using Borland Turbo C++ …

Member Avatar for jwenting
0
559

The End.