New to c++ from MATLAB

Hey guys,
I'm new to c++ programming from MATLAB.
I'm trying to import a matrix from a .txt file to be manipulated in c++. I can get the file inputted into c++ however I can't assign it a variable name.

The code I have is posted below:
Any help is appreciated.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  //C++ version of dr

#include <iostream>
#include <fstream>
#include <string>
#include <vector>

using namespace std;

int main(){
long begin, end;
ifstream timeone ("Rec-August 12 Run 5-000059-224_18_04_21_070_32_17200.txt");//C++ version of dr

#include <iostream>
#include <fstream>
#include <string>
#include <vector>

using namespace std;

int main(){
long begin, end;
ifstream timeone ("Rec-August 12 Run 5-000059-224_18_04_21_070_32_17200.txt");
It looks like you had a copy-paste error. Can you edit your post and show the actual code you are using?
Topic archived. No new replies allowed.