Beginners - April 2012 (Page 58)

duplicate names
 
I am creating a program that takes names and stores them in an array along with the grades the students names. i have the whole program wrote but i am having pr...
[1 reply] : You can have a menu at the bottom of your loop that prompts a break co... (by Stewbond)
using getline() for objects?
 
Hello. So I decided to make a new topic since I now know what my problem is. Here's my code: ofstream dataOut; //output stream for the data file ifstream...
[7 replies] Last: > I really don't understand how to write the operator>> function. > O... (by JLBorges)
Virtual destructor giving me problems );
 
Hi I'm working on an exercise from a textbook and I am having trouble seeing why I get this error, could someone explain to me the logic behind this? The rel...
[2 replies] Last: That worked, thanks a ton Cubbi! (by georgewashere)
Tellg() fails with .csv on Windows (in Linux works great)
 
Hi everybody, I'm creating a program which reads from a csv file and stores each column in an array of structs. Anyway, in Linux with Kdevelop everything works...
[13 replies] Last: thanks coder777! I've checked and, as you pointed out, when using bin... (by JCaselles)
quicksort alogorithm not sorting :-(
 
So after many helpful hints I finally am compiling!! However, my quicksort is not working correctly and I don't understand why! The goal is to sort a vector o...
[3 replies] Last: Is it by reference because I move stuff around in the partition funct... (by coder777)
Got an input, how do I parse only sections of it?
 
Thanks in advance. I've successfully gotten a text input using the curses library, and successfully comparing it against some other strings. That's cool and all...
[4 replies] Last: A proper parser may be more flexible when dealing with invalid input, ... (by hamsterman)
Problems with invoking constructor of dynamic allocated array
 
hello everyone here is my problem that I encountered when programming c++ in SDL, but this problem is just a very simple c++ problem: I have already made a...
[12 replies] Last: I guess now that I think about it it is the same, the only difference ... (by LB)
streams and files question
 
Write a program system that reads several lines of information from a data file and prints each word of the file on a separate line of an output file followed b...
[17 replies] Last: Try replacing char* line; //to store file name with char line ; ... (by Danishx83)
Simple question
 
What determines the size of a class within an object when that class is being used as the object schematic's/type. Example: #include <iostream> using na...
[8 replies] Last: [quote=Factors]Is it only that? what about function's ?. Member funct... (by closed account zb0S216C)
using rand() function
 
I did a couple programs for my c++ class using rand() and by mistake I did not include <ctime>. I got some points taken off and I know it should have included ...
[5 replies] Last: mhceotto, I did a couple programs for my c++ class using rand() and ... (by closed account 1vRz3TCk)
Speeding up qsort usage.
 
I'm currently using qsort to sort an array of Cable objects. int comparator (const void *elem1, const void *elem2 ) { if((*(Cable**)elem1)->cost < (*(Cab...
[3 replies] Last: Did you turn on optimizations? Never measure performance with optimiza... (by Peter87)
FILE STOPPED WORKING!!
 
Hi guys, I had a problem, I created a C++ file in DEV C++ 4.9.9.2 Beta and it crashed. Ok, this computer is slow so i tryed again. And it crashed AGAIN. And al...
[3 replies] Last: thanx, on my laptop it worked but its batts are dead so i needed on th... (by nikolabebic)
-1.#IND, output for quadratic equation program
 
Ok guys, i think that the title of the post says everything. My problem is that my program is supposed to solve a quadratic equation but the second zero of the...
[2 replies] Last: OMG you're right! Thank you Works perfectly! TY once again (by jpcsasantos)
Data structure
 
hi everybody, I have data under matrix form in a text file as follows: <tab> 1 <tab> 2 <tab> 3 <tab> 4 <tab> 5 <tab> 6 <tab> 7 <tab> 1<tab> <tab> F <tab> ...
[10 replies] Last: Thank you, it's getting clearer, I'll reply whenever it's done. (by nadir CoCo)
How do you create an array of floats from a string?
 
I currently have a string of floats that I need to convert into an array of floats, how would I do this? I need to convert this: string Vertices = "0.3 0.5 ...
[3 replies] Last: Thank you, that worked perfectly! (by Sean Booth)
Help with my homework!!!
 
1. Write a function that receives an integer x as an argument and print x stars in a line. For example, if 5 is passed to the function, ***** will be the ou...
[2 replies] Last: The code I provide below is incomplete but more than enough for you to... (by codingshark)
Need to make a program that read student names and marks from a file.
 
The Task The problem is to read student names and marks from a file, grade them and display the details (names and grades) on screen together with the highes...
[5 replies] Last: I have re edit it plz have look n let me knw where i got wrong #incl... (by student2)
Garbage output with class declaration and Vectors
 
Hello! I am having two issues with a program I am working on...please help! First problem should be easy but I can't figure it out. Whenever I declare an in...
[7 replies] Last: perfect! thank you!! (by calvarado777)
Letter Frequenices
 
How come I keep getting a file error? #include <fstream> #include <iostream> using namespace std; int main() { int freq ; // frequencies of le...
[9 replies] Last: thanks, I got this to work for me #include <fstream> #include <iost... (by kdmpenguin)
Chess piece ranges
 
Hey guys, I'm writing a chess program and to check whether the functions checkmate and check and true, I will need to find the range of each piece (every sin...
[1 reply] : It will be relatively slow. Assuming you have 16 pieces, and 64 locat... (by personak)
April 2012 Pages: 1... 5657585960... 66
  Archived months: [mar2012] [may2012]

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