Beginners - October 2013 (Page 19)

Second smallest number in array
 
Hello, I have this txt file 12.5 17.69 458.2 4892.3 7.02 And I need to find second smallest number in array, how I need to do it? double min=0.0, min2; for(...
[6 replies] Last: @abhishekm71 Indeed, you are right. I stand corrected. I have impleme... (by Bourgond Aries)
Sorting problems
 
The following information is in my header file #ifndef MYCLASSES_H_INCLUDED #define MYCLASSES_H_INCLUDED #include<iostream> #include<string.h> #include<fstr...
[4 replies] Last: The area I found a problem is in the header file...b.c. The data recie... (by eman2013)
by jer311
Problem running file
 
When I run my program, it gets stuck in a loop or something and there are no error messages... any help? Also, how do you make the program so it doesn't repeat...
[3 replies] Last: Replace line 50 if (file1 && num1 < num2) with: if (file... (by Chervil)
by hampsu
Help with basic functions
 
I'm having trouble figuring out how to write the math for part of the function below. How would I account for the 1/8 inch adjustment for every 10 years over ag...
[3 replies] Last: Actually... double jacket (double h, double w, double a) { double ... (by machinafour)
by Shugo3
isword program
 
Using the vector class, and a vector of strings, write a program to determine if the token entered is a word. Your program should prompt the user to repeatedly ...
[1 reply] : Hi there, [quote=Shugo3]I am having trouble with one is recognizing t... (by closed account o3hC5Di1)
How do I associate variables with eachother?
 
I'm working on a small program for class. It is a simple program that presents temperatures from different cities located in a txt file. Once it does that it ca...
[3 replies] Last: Add new variables: char LowCity = ""; char HighCity = ""; ... (by Chervil)
passing a struct as an argument
 
I am trying to pass a structure as an argument to a function that saves the data in the struct to a file. For some reason the data existing in the struct gets r...
[2 replies] Last: Apologies as this is a bit off topic, but where exactly in that method... (by mutexe)
Help with C++ project
 
So I'm working on a program that acts as a dictionary. It needs to be able to read in a file that has a list of words and their definitions and then it needs to...
[2 replies] Last: It looks "map" would be far better storage for words and definitions r... (by rodiongork)
try and catch problem
 
there is illogical results by using try and catch block #include<iostream> using namespace std; class Circle_computations { public: double a...
[3 replies] Last: try { // if(r||heigh_t<=0.0) if( r <= 0.0 || ... (by JLBorges)
Memory game using OOP
 
Hey, i want to make a memory game where you have to find the couples of numbers in the board but i have some questions. i don't know if every card should be an...
[8 replies] Last: I made the V2, you move with arrow keys and turn the card with spaceba... (by Pstrnil)
1D heat transfer
 
Hello. I am newbie in c++. I got an assignment that asked me to make a one dimensional heat transfer problem by using finite difference explicit method with ...
[11 replies] Last: while (error >= 0.0001) it's stuck in this loop, because error = ma... (by mutexe)
HELP PLEASE, CODE DUE IN 1 HOUR!
 
I have my entire code written for this assignment (which reads values from an input file) as well as the data set, but when I run it using the data set nothing ...
[4 replies] Last: Thank you for the help! I changed them all and it's still giving me th... (by daytonflores)
numbers triangle
 
Write a C program to print the following number structure: 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 ...
[1 reply] : cout << "1" << " " << "2" << endl; you should include a space between... (by mjyz)
Question about pointers from beginner
 
Hello everybody. I'm a new learner of C++ and have couple questions about pointers: 1) So, in the chapter about pointers there was pointer declared like: -- ...
[7 replies] Last: Disch, thanks a lot! It was really helpful! (by match88)
how to read characters from an input
 
so I've been trying to figure out how I can access individual integers from a zip code that is inputted by the user and adding them up. I was thinking of using ...
[1 reply] : if you're just adding the numbers up it shouldn't matter the order of ... (by giblit)
by dkmike
c++ 1D Arrays, reading a txt file
 
Okay, I'm totally new to arrays, and my professor is restricting that we only use 1d arrays and not 2d. I need to write a program that reads a txt file of qu...
[2 replies] Last: Hullo, dkmike. You will need to use an ifstream to load the file. Ta... (by Superdude)
Lab 4 help--functions
 
My teacher was really opaque on the directions for this lab. So, I rewrote the directions in the way I understand them, and am hoping anyone in the online commu...
[2 replies] Last: anyways what is line 39 supposed to be doing (by giblit)
Can I make an if statement that changes depending on the return of a function?
 
I want to make an if statement that says, "If Y dimensions are okay, then use X function and return Z. double boxTester(){ double OK,...
[1 reply] : Can I use an if function to test if the function returns a certain va... (by rodiongork)
counting letters
 
How would I count the number of times a certain letter is used in a document using c++?
[2 replies] Last: If you need counts for several letters it would be good to use array o... (by rodiongork)
Help Quick with Power Series please
 
I need to compute a power series and I'm not sure whats wrong! /* Write a funtion which takes an array of coefficients,ai and an integer n, and returns ...
[1 reply] : Well, a few things. For one, 'ai' is a variable of type double, not an... (by Ispil)
October 2013 Pages: 1... 1718192021... 86
  Archived months: [sep2013] [nov2013]

This is an archived page. To post a new message, go to the current page.