Beginners - May 2015 (Page 34)

by tylerb
Putting an array in numerical order
 
Hello Folks, I need to write a program that takes an array and then displays it in reverse, displays only the even values, and displays the array in descend...
[1 reply] : Use sorting algorithm like http://www.cprogramming.com/tutorial/comput... (by LendraDwi)
What is wrong with my sort function?
 
Hi, I am creating a program which asks for ten characters, and in return it sorts them in alphabetical order. Here is the code: // sa2.cpp : Defines th...
[1 reply] : I think your problem is in sorting algirithm find some articles about ... (by LendraDwi)
Can you implement an efficient C++ code for finding frequency of an element for a range into an array?
 
I am a beginner in competitive programming. I've read a problem where I have to output the number of frequency of an element into a sub-array range. I've imple...
[1 reply] : suppose that you store or every number in the array the indexes where ... (by ne555)
by Thecal
Arrays output.
 
Got another array issue. I am trying to display the cin from the user in the loop while dealing with arrays. const int CARS = 5; int train_cars , ...
[10 replies] Last: Anyone else have any possible input? (by Thecal)
Looping switch
 
I want to loop back the main menu. Whenever i input a number it'll output the inorder, preorder, and postorder. After outputting, it'll display a message "Press...
[5 replies] Last: No problem! (by Tyrelius)
Sort three floating values in descending order
 
Please help me out with my assignment. I am quite new to programming language and got stuck with this assignment. Here is the assignment: Write a class named...
[2 replies] Last: oh it works now, thank you so much! (by cuoituoi2602)
Loop Improperly Executing with Array
 
I'm trying to recreate a basic student database and having trouble with the second half. It works the same whether or not I incorporate the first half, so I jus...
[no replies]
reading data from file into arrays and calculating
 
Hello everyone! I am new to C++ and I'm having major issues with arrays and loops, especially in this assignment. I have a text file with a series of numbers ...
[2 replies] Last: Thanks! Makes sense now! I have another question: Since the text I a... (by havox89)
by enemy
Dynamic memory allocation- class objects
 
Hello! I tried in Gamer's example to "preserve" an object created in a function in the A class using dynamic allocation, so that I can call it directly from ma...
[18 replies] Last: do you mean like this? void a() { B b(10); ... (by Jaybob66)
STL functions like push(), pop() etc
 
Hi, I am trying to start this school assignment where I have to make a C++ program that can operate like one of those old HP-35 calculators. Basically I have s...
[3 replies] Last: main.cpp:30:36: error: void value not ignored as it ought to be doub... (by Jaybob66)
Did I declare a variable wrong???
 
I'm compiling a program on tutorialspoint.com and an error keeps occurring whenever I try to compile it. One of the if statements that check if one of the va...
[2 replies] Last: Colin the error here is std is not needed . Just declare an integer va... (by Greentoast)
by Winsu
My program crashs
 
the compiler doesnt give to me any error, but when I run my program It crash as soon as I run it,why is it happening? #include <stdio.h> #include <iost...
[10 replies] Last: I'm electronic engineer, I my final proyect was Espresso-II, it's an a... (by Winsu)
by relgin
How to use functions to read data from file?
 
The purpose of the program below is to read in a list of thrust curve points which are stored in a two dimensional array. Then using the points the thrust for a...
[no replies]
Trying to print to text file using out_data but some line are missing
 
This program takes code from a file cost.txt and output some calculations and then writes the output to a file cost.out cost.txt looks like this Books 45.01...
[no replies]
"Write a program that reads a set of integers and then finds and prints the sum of the numbers that are evenly divisible by 5"
 
So here is what I am trying to do: "Write a program that reads a set of integers and then finds and prints the sum of the numbers that are evenly divisible by 5...
[5 replies] Last: I think I can take care of the rest from here but I will let you know.... (by cha0sweaver)
Getting the sum of an array?
 
Hi guys, writing a code where the use inputs the 10 elements of the array and I have to write a function that gets the sum of the 10 elements. I can't really te...
[1 reply] : Well the problem here is this function : void display(int a , int s... (by konstance)
how do i use do while loop to find the length of two strings?
 
hey guys, im having problems with a piece of code im trying to create using do while loop, here are the conditions: Your program receives from user two strin...
[7 replies] Last: //my first programming project #include <iostream> using namespace std... (by toasterstrudel)
Summing an Array with data from file resulting in enormous numbers
 
When my output gets processed I'm getting giant numbers where I'm trying to sum the array's and I cannot figure out why. The data from the text file outputs co...
[6 replies] Last: Hey I was typing my reply when you set yours konstance. You are right ... (by Kaelure)
Help!
 
For my programming final we have to make this "game". It just has characters and stats and reads in movements from a data file. If the players come within 10 un...
[3 replies] Last: [quote=slestr94]Yes the teacher messed up the shield stats so that the... (by ultifinitus)
Why is complier showing (.text+0x20)||undefined reference to `main'|?
 
I've written the following program. #include<iostream> #include<sstream> #include<string> using namespace std; int mian() { string s; getline(cin,s...
[1 reply] : You misspelled 'main' on line 7 (by Disch)
May 2015 Pages: 1... 3233343536... 40
  Archived months: [apr2015] [jun2015]

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