Click here to Skip to main content
15,895,709 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: copying textbox information Pin
Adnan Merter21-Feb-08 12:17
Adnan Merter21-Feb-08 12:17 
GeneralRe: copying textbox information [modified] Pin
Mark Salsbery21-Feb-08 12:29
Mark Salsbery21-Feb-08 12:29 
GeneralRe: copying textbox information Pin
Michael Schubert21-Feb-08 12:19
Michael Schubert21-Feb-08 12:19 
GeneralRe: copying textbox information Pin
Adnan Merter21-Feb-08 12:20
Adnan Merter21-Feb-08 12:20 
GeneralRe: copying textbox information Pin
Michael Schubert21-Feb-08 12:22
Michael Schubert21-Feb-08 12:22 
GeneralRe: copying textbox information Pin
Adnan Merter21-Feb-08 12:23
Adnan Merter21-Feb-08 12:23 
QuestionCombination of connectionstring in new dataset and connectionstring in the app.config file Pin
cad-JC21-Feb-08 11:26
cad-JC21-Feb-08 11:26 
GeneralSubstring Error. Please help Pin
msogun21-Feb-08 11:14
msogun21-Feb-08 11:14 
I am trying to cut 3 bytes from the data read from the file and keep getting error. Here is the error and the code.

Error...
**************************************************
///error C2228: left of '.substr' must have
class/struct/union
***************************************************

Code...

#include "stdafx.h"
#include <iostream>
#include <iomanip>
#include <conio.h>
#include <string>
#include <fstream>

using namespace std;
string DataCut;

struct s {
char test[4];
char test1[4];
};
struct s myStr;

int _tmain(int argc, _TCHAR* argv[])
{

char *str1, Mycut[4];
char str[80000];

string sear1;
size_t result;

fstream file_op("c:\\ProjectRead.txt",ios::in);
while(!file_op.eof())
{
file_op.getline(str, 80000);
str1 = str;
*********************************************************************
Mycut = str.substr(0,4); /// Error here
cout << str1;
*********************************************************************



} file_op.close();



system("PAUSE");
return 0;
}
GeneralRe: Substring Error. Please help Pin
Mark Salsbery21-Feb-08 11:37
Mark Salsbery21-Feb-08 11:37 
GeneralRe: Substring Error. Please help Pin
msogun21-Feb-08 14:45
msogun21-Feb-08 14:45 
GeneralRe: Substring Error. Please help Pin
David Crow22-Feb-08 2:50
David Crow22-Feb-08 2:50 
GeneralRe: Substring Error. Please help Pin
Mark Salsbery22-Feb-08 5:58
Mark Salsbery22-Feb-08 5:58 
GeneralRe: Substring Error. Please help Pin
Mark Salsbery21-Feb-08 11:48
Mark Salsbery21-Feb-08 11:48 
GeneralRe: Substring Error. Please help Pin
jhwurmbach21-Feb-08 23:19
jhwurmbach21-Feb-08 23:19 
GeneralRe: Substring Error. Please help Pin
msogun23-Feb-08 20:41
msogun23-Feb-08 20:41 
GeneralUNICODE, MultiByte, and UI's Pin
masnu21-Feb-08 9:15
masnu21-Feb-08 9:15 
GeneralRe: UNICODE, MultiByte, and UI's Pin
Mark Salsbery21-Feb-08 10:49
Mark Salsbery21-Feb-08 10:49 
GeneralRe: UNICODE, MultiByte, and UI's Pin
krmed22-Feb-08 0:40
krmed22-Feb-08 0:40 
QuestionAdvise - How to make C++ Windows Form App without .NET framework Pin
alanteigne21-Feb-08 8:30
alanteigne21-Feb-08 8:30 
GeneralRe: Advise - How to make C++ Windows Form App without .NET framework Pin
TheGreatAndPowerfulOz21-Feb-08 8:33
TheGreatAndPowerfulOz21-Feb-08 8:33 
GeneralRe: Advise - How to make C++ Windows Form App without .NET framework Pin
alanteigne21-Feb-08 8:42
alanteigne21-Feb-08 8:42 
GeneralRe: Advise - How to make C++ Windows Form App without .NET framework Pin
TheGreatAndPowerfulOz21-Feb-08 8:47
TheGreatAndPowerfulOz21-Feb-08 8:47 
GeneralRe: Advise - How to make C++ Windows Form App without .NET framework Pin
alanteigne21-Feb-08 9:05
alanteigne21-Feb-08 9:05 
GeneralRe: Advise - How to make C++ Windows Form App without .NET framework Pin
alanteigne21-Feb-08 9:22
alanteigne21-Feb-08 9:22 
GeneralRe: Advise - How to make C++ Windows Form App without .NET framework Pin
Ali Rafiee21-Feb-08 9:45
Ali Rafiee21-Feb-08 9:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.