49,761 Topics
| |
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); … | |
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? | |
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? … | |
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. … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
What does it mean if my program compiles but when I run it it says foating point exception (core dumped). Thanks for your help!! | |
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 … | |
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? … | |
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] | |
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. | |
can anyone help me in reading the file names from a folder with a specific extention in VC++ enviroment. thanks in advance sachin | |
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. … | |
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 ) ; | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. | |
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 … | |
[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 … | |
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++ … |
The End.