General C++ Programming - November 2012 (Page 46)

How to fix bug in file writing operation
 
#include <fstream> #include <limits> #include<iostream> #include<string.h> using namespace std; //Filling file to skip copying whole file into memory ...
[no replies]
Reading from 10 input files?
 
bool Open_InputFile (ifstream &fin) { string file_name; cout << "Enter Input File Name: "; getline (cin, file_name); fin.open(file_name.c_str...
[5 replies] Last: to_string(i) converts numerical value 'i' to string. This function is ... (by unkn00wn)
Odd error.
 
I think it has something to do with my function to be honest fellow programmers I'm at a total lost. Here's my main followed by my header file. //Course: 40...
[2 replies] Last: mainMenu is asking for a string and returning an int. You are passing... (by pogrady)
I need help on Link List
 
1. I have this program that scans a file and get each word and create a Link List. the file has this line "the big brown fox" the program is shown below. ...
[no replies]
Reading hex values from an ascii text file
 
I need to read an ascii text file that is populated with hex values that cannot exceed the size of an unsigned integer. the file contains records with 6 fiel...
[no replies]
Help in editing a file
 
Hello all, i am trying to edit a specific line of a file, without using another file. i am trying to read the data at n'th line and process data and then write...
[no replies]
Ignore heading line if input file
 
I am trying to read a file with the following format Ticker Date Open High Low Close Up Vol Dn Vol SPX ~NYSE 3/1/1965 550 561 550 561 27.5 22.4 87.25 ~NYSE...
[4 replies] Last: Thanks that works great. From the function definition I could not tell... (by razzbarry)
by mono
link list string???
 
Question: I have to create a link list of strings and then every single letter has to be separated into a link list for example. if I enter two words like "...
[5 replies] Last: It might be easier to use std::vector<char> Then you can use any perm... (by pogrady)
Getting position of rotated bitmap
 
Hey, rrybody Im just trying to simulate a tank kinda thing and ive ran into another problem. Im trying to get the position of the barrel of the tank no matte...
[1 reply] : What is 32 and 6? For a given turrnent length len , and origin (posi... (by kbw)
sorting a vector
 
I have a vector defined so: vector<float>difflist; How can i sort the float numbers pushed in this vector from smallest to the greates? which library ...
[1 reply] : http://cplusplus.com/reference/algorithm/sort/ (by Catfish2)
Game project
 
I'm doing a project thats a jousting game between knights, I'm doing all my class (3) and everything all in one file, is that okay? I also am getting an error....
[4 replies] Last: So you have 2 errors, you solved one and now another is showing. (by closed account o1vk4iN6)
How to connect to website?
 
How do I create a bot that connects to website,and does a specific task like click a button?
[no replies]
Making Code::Blocks Portable
 
Hi guys. For a while Ive been wondering how to make IDEs, like Code::Blocks and Visual C++ Express portable. I did a simple search for Code::Blocks, sinc...
[no replies]
by mac193
Modify a void function to a value-returning
 
I'm not sure how to change a void function into a value-returning one. The function we were given for class is, void convertToMeters (int ft, double in, double...
[2 replies] Last: double convertToMeters (int ft, double in, double& m) { //Conversion ... (by BlackSheep)
how to overite multimap::insert?
 
Hi, I am coding a multithread program. I have a multimap that will receive data from many threads. Therefore I want to wrap the class in a derived class wi...
[4 replies] Last: why did you advise not to inherit from std::multimap? Because it is ... (by Cubbi)
Array(median)
 
The median of an array of numbers is the element m of the array such that half the remaining numbers in the array are greater than or equal to m and half are le...
[1 reply] : Dont expect anyone to help you. You just copied your assignment line f... (by Angeljruiz)
Why is my Macro in C not Working
 
Before asking for an explanation, please note, that the program is working correctly, I get the correct output, except LINT is complaining. 1. This is what L...
[1 reply] : Macros are simply a text substitution facility. Each time you invoke ... (by AbstractionAnon)
by BandK
Char Array...
 
How to check if in linked list char array is equal to another char array in list? Example... struct list{ char name ; list *next; } User wri...
[4 replies] Last: Ok...Thanks...My problem actualy is to find number of equal char array... (by BandK)
Prompt for User Input Function?
 
I'm writing a function that prompt for the user string input and output file and I want to use the input in another function. Here's the function: string ...
[1 reply] : You're looking for pass-by-reference . void getInput(string & inpu... (by Moschops)
problems with linked list
 
i have some problem and really don't know what to do, i will appreciate any help. I need to make program for adding new animals to linked list, but not adding a...
[1 reply] : i finally found solution, so i'm gonna paste code there if someone els... (by Tomislav Cundic)
November 2012 Pages: 1... 4445464748... 51
  Archived months: [oct2012] [dec2012]

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