Search:
Type: Posts; User: Neil.Dyke
Search:
Search took 0.02 seconds.
-
Hello,
Say I have a file with two lines:
// file
20 21
//end of file
How do I get the numbers into integer variables from the file in an efficient way?
-
March 26th, 2010, 08:19 AM
Hi,
Is there a way to output data to a file without erasing its contents?
Thanks
Neil
-
March 22nd, 2010, 02:39 PM
Its only caps.
so for example i need to sort the string "TEST" to "ESTT".
-
March 22nd, 2010, 12:12 PM
Do you have some code? I'm lazy ;)
-
March 22nd, 2010, 12:10 PM
Hello,
Does anyone have an algorithm or know a function that can sort a std::string for me?
Say i have:
string one = "test";
sorting it alfabetically would result in > "estt"
-
January 30th, 2010, 08:14 AM
-
January 29th, 2010, 06:54 PM
Sure, here's the code. Its a program that reads a file. The first to lines are int, first int states how many rows there are after the 2 lines that have been read. The second int says how much colums...
-
January 29th, 2010, 06:01 PM
Thanks for your reply, I understand. Would using a std::string in this case be more efficient (as in faster to make)?
-
January 29th, 2010, 05:50 PM
Hi,
Is it possible to delete certain items from a char sequence or string?
Say i have:
char test[5] = {'a','b','c','d','e'};
Is it possible to delete 'a' for example?
Thanks!
-
January 26th, 2010, 05:29 PM
Thank you, Lindley. That helped!
@ Philip, is there a way i can read it directly into int?
- Neil.
-
January 26th, 2010, 05:03 PM
Thanks for your quick reply, i get an error whilst compiling though.
Heres my code:
<code>
#include <iostream>
#include <fstream>
#include <string>
#include <cstdlib>
using namespace std;
-
January 26th, 2010, 04:51 PM
Hello,
Is it possible to convert the input you get from using the getline(inputfile, string) to an int?
Say i have a file "abcd.txt", with the following content:
6
3
How can i convert...
|
Click Here to Expand Forum to Full Width
|