No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Using: Visual Studio Language: Visual Basic I already loaded a xml file to my datagrid already, what i am trying to do is have the option to save the datagrid data back as an xml file. I have the code, but how do I close the original xml file that … |
|
This function reads a text file and shows how many times a words appears in the text file, how do I save it to a different text file after running this function? std::ifstream f("test.txt"); std::istream_iterator<std::string> eof; std::multiset<std::string> words( std::istream_iterator<std::string>(f) , eof); for( std::multiset<std::string>::iterator i = words.begin(); i!=words.end(); i = words.upper_bound(*i) … |
|
I need to read a text file, parse file, and check occurence of words without leading or trailing punctuations. this is what i have so far, std::ifstream f("textfile.txt"); std::istream_iterator<std::string> eof; std::multiset<std::string> words( std::istream_iterator<std::string>(f) , eof); for( std::multiset<std::string>::iterator i = words.begin(); i!=words.end(); i = words.upper_bound(*i) ) std::cout << *i<< ": " … |
|
What is the best way to read a text file and print to console, then grab that string and convert string to a const char? |
|
Need help reading a csv to NSString and then to NSMutableArray. I need to output the name of a certain row base on car. file ex: car, bike, wheels toyota, mountainbike, rims .. .. .. |
|
Re:
Here is a function to print my binary search node tree, void printtree(struct node *tree) { if (tree!=NULL) { printtree(tree->left); printf("%s %d\n",tree->word, tree->lineNumber); printtree(tree->right); } } How would I save what I print to a text file??????? |
|
I have read a text file to console and printed the file after reading, int textLength=0 int c; int c; FILE *file; file = fopen("ModestProposal.txt", "r"); if (file) { while ((c = getc(file)) != EOF) putchar(c); //fclose(file); } textLength = strlen(c);//get the length of the text How come I can … |
|
ok, NEED HELP HERE TO GET ALL THE CHARACTERS IN THE TEXT FILE AS A FULL LENGTH AND DO SOMETHING WITH IT... Line 31 #include "stdafx.h" #include<stdio.h> #include<stdlib.h> #include<string.h> #include <iostream> #include <iomanip> #include <string> #include <sstream> #include <fstream> #ifndef _DEPRECATION_DISABLE /* One time only */ #define _DEPRECATION_DISABLE /* Disable … |
|
Re:
**Why is it that when i use ctime to capture the time I am getting this error: time_t now = time(0);// convert now to string form char* dt = ctime(&now); cout << "The local date and time is: " << dt << endl; error C4996: 'ctime': This function or variable … |
|
How would i output my vector of strings into a ".txt" file? |
|
Okay, so I know how to reverse the whole string of a vector, [code]for_each(newLines.begin(), newLines.end(), [](std::string& s){ reverse(s.begin(), s.end()); }); copy(newLines.begin(), newLines.end(), std::ostream_iterator<std::string> (std::cout, "\n")); [/code] But is there a way to only reverse the first 10 or so characters of a vector string? i.e. sdjkfskjd sfdsdf sdjflkjsdjklfsdlkjflksdjfkls jklda sdfioss … |
|
I need a little help to store two strings into a vector and reversing the order of each string. i.e. 123456789 needs to be 987654321 12345 needs to be 000054321 reason for that is I need to add those two numbers together. |
|
I have a set of data imputed into a set of arrays as the following: for (int i=0;getline(file,(cities[i]),',');i++) { getline(file, countries[i], ','); getline(file, latitudes[i], ',') ; getline(file, longitudes[i]); } How do I sort the array line of latitudes and longitudes without changing countries and city it is associated with? |
|
How would I search within a vector array for a user input? I need to find the city in the vector array and use it's index to compare distances between other arrays with the array. This is what I have so far, I've read the cvs file to a vector … |
|
I need help to store my data i read from a cvs file, how do i input it into my arrays and use it to manipulate in other #include <iostream> #include <iomanip> #include <string> #include <cmath> #include <stdio.h> #include <fstream> using namespace std; const int MAX_ARRAY_SIZE = 120; void getData … |