14-09-16, 08:15 AM
14-09-16, 11:45 AM
نعم ممكن بهذا الشكل
PHP كود :
TextBox1.Text = System.IO.File.ReadAllText("C:\test.txt")
14-09-16, 02:15 PM
(14-09-16, 11:45 AM)أبو عمر كتب : [ -> ]نعم ممكن بهذا الشكل
PHP كود :
TextBox1.Text = System.IO.File.ReadAllText("C:\test.txt")
لاكن هذا بلغة vb.et و ليس c++
15-09-16, 12:07 AM
آآآآآآآآآآآآآسف جداً
ظننت المشاركة في قسم VB
PHP كود :
#include <iostream>
#include <fstream>
#include <cstdlib>
#include <string>
using namespace std;
int main() {
string filename = "test.txt";
// Write to File
ofstream fout(filename.c_str()); // default mode is ios::out | ios::trunc
if (!fout) {
cerr << "error: open file for output failed!" << endl;
abort(); // in <cstdlib> header
}
fout << "apple" << endl;
fout << "orange" << endl;
fout << "banana" << endl;
fout.close();
// Read from file
ifstream fin(filename.c_str()); // default mode ios::in
if (!fin) {
cerr << "error: open file for input failed!" << endl;
abort();
}
char ch;
while (fin.get(ch)) { // till end-of-file
cout << ch;
}
fin.close();
return 0;
}
ظننت المشاركة في قسم VB
15-09-16, 12:47 AM
(15-09-16, 12:07 AM)أبو عمر كتب : [ -> ]آآآآآآآآآآآآآسف جداًجزاك الله خير
PHP كود :
#include <iostream>
#include <fstream>
#include <cstdlib>
#include <string>
using namespace std;
int main() {
string filename = "test.txt";
// Write to File
ofstream fout(filename.c_str()); // default mode is ios::out | ios::trunc
if (!fout) {
cerr << "error: open file for output failed!" << endl;
abort(); // in <cstdlib> header
}
fout << "apple" << endl;
fout << "orange" << endl;
fout << "banana" << endl;
fout.close();
// Read from file
ifstream fin(filename.c_str()); // default mode ios::in
if (!fin) {
cerr << "error: open file for input failed!" << endl;
abort();
}
char ch;
while (fin.get(ch)) { // till end-of-file
cout << ch;
}
fin.close();
return 0;
}
ظننت المشاركة في قسم VB