क्या मुझे पर मैन्युअल रूप से कॉल करने की आवश्यकता है जब मैं std::ifstream का उपयोग करता हूं? उदाहरण के लिए, कोड में: std::string readContentsOfFile(std::string fileName) {
std::ifstream file(fil
से अहस्ताक्षरित चार पढ़ने मैं एक बाइनरी फ़ाइल से अहस्ताक्षरित बाइट्स पढ़ना चाहते हैं। इसलिए मैंने निम्नलिखित कोड लिखा था। #include <iostream>
#include <fstream>
#include <vector>
#include <istream>
मैं SO पर यहां ifstream प्रश्नों पर रहा हूं और मुझे अभी भी एक साधारण टेक्स्ट फ़ाइल पढ़ने में परेशानी हो रही है। // CPPFileIO.cpp : Defines the entry point for the console application.
//
#include "
मैं std :: ifstream का उपयोग करके अगली पंक्ति में कैसे जा सकता हूं और स्थानांतरित कर सकता हूं? void readData(ifstream& in)
{
string sz;
getline(in, sz);
cout << sz <<endl;
int v;