Click here to Skip to main content
15,913,487 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralAppend email signature Programmatically. Pin
ColinDavies4-Nov-01 15:49
ColinDavies4-Nov-01 15:49 
GeneralRe: Append email signature Programmatically. Pin
Nish Nishant4-Nov-01 17:18
sitebuilderNish Nishant4-Nov-01 17:18 
GeneralRe: Append email signature Programmatically. Pin
Anonymous9-Dec-02 22:48
Anonymous9-Dec-02 22:48 
GeneralOnclick Pin
Ever12344-Nov-01 15:38
Ever12344-Nov-01 15:38 
GeneralRe: Onclick Pin
Michael Martin4-Nov-01 16:31
professionalMichael Martin4-Nov-01 16:31 
GeneralRe: Onclick Pin
Nish Nishant4-Nov-01 16:34
sitebuilderNish Nishant4-Nov-01 16:34 
GeneralRe: Onclick Pin
PJ Arends4-Nov-01 16:39
professionalPJ Arends4-Nov-01 16:39 
QuestionWhy this code doesn't work properly? Pin
4-Nov-01 12:35
suss4-Nov-01 12:35 
#include <iostream.h>
#include <fstream>
#include <stdlib.h>
#include <malloc.h>
#include <assert.h>
#include "StringTokenizer.h"

class Foo
{
public:
Foo() {};
~Foo() {};
string m_first_name;
string m_last_name;
string m_title;
string m_degree;
};

void main( void )
{
char* row;
string element;
string element_from_pos;
Foo* foo;

ifstream file( "parsing_file.txt", ios::in );
if( !file )
cerr << "Greska pri otvaranju datoteke!";

row = (char*) malloc( 200 );
while( !file.eof() )
{
file.getline( row, 200 );
StringTokenizer strtok( row, "," );

int nSum = strtok.countElements();
element = strtok.getNextElement();

foo = new Foo;
foo->m_first_name = strtok.elementAt( 0 );
foo->m_last_name = strtok.elementAt( 1 );
foo->m_title = strtok.elementAt( 2 );
foo->m_degree = strtok.elementAt( 3 );
}

free( row );
delete foo;
}

AnswerRe: Why this code doesn't work properly? Pin
Christian Graus4-Nov-01 13:16
protectorChristian Graus4-Nov-01 13:16 
GeneralRe: Why this code doesn't work properly? Pin
Nish Nishant4-Nov-01 16:17
sitebuilderNish Nishant4-Nov-01 16:17 
GeneralRe: Why this code doesn't work properly? Pin
Christian Graus4-Nov-01 16:40
protectorChristian Graus4-Nov-01 16:40 
GeneralRe: Why this code doesn't work properly? Pin
Nish Nishant4-Nov-01 17:10
sitebuilderNish Nishant4-Nov-01 17:10 
GeneralRe: Why this code doesn't work properly? Pin
Christian Graus4-Nov-01 17:17
protectorChristian Graus4-Nov-01 17:17 
GeneralRe: Why this code doesn't work properly? Pin
Mike Nordell7-Nov-01 1:08
Mike Nordell7-Nov-01 1:08 
AnswerRe: Why this code doesn't work properly? Pin
PJ Arends4-Nov-01 16:46
professionalPJ Arends4-Nov-01 16:46 
AnswerRe: Why this code doesn't work properly? Pin
4-Nov-01 21:10
suss4-Nov-01 21:10 
GeneralHey Yet Another Question (This ones about launching an application) Pin
Peter Liddle4-Nov-01 11:01
Peter Liddle4-Nov-01 11:01 
GeneralRe: Hey Yet Another Question (This ones about launching an application) Pin
RobJones4-Nov-01 11:05
RobJones4-Nov-01 11:05 
GeneralRe: Hey Yet Another Question (This ones about launching an application) Pin
Peter Liddle4-Nov-01 11:13
Peter Liddle4-Nov-01 11:13 
GeneralRe: Hey Yet Another Question (This ones about launching an application) Pin
tonyschr4-Nov-01 14:36
tonyschr4-Nov-01 14:36 
GeneralRe: Hey Yet Another Question (This ones about launching an application) Pin
Mike Nordell7-Nov-01 1:10
Mike Nordell7-Nov-01 1:10 
GeneralCopying Pin
Peter Liddle4-Nov-01 10:30
Peter Liddle4-Nov-01 10:30 
GeneralRe: Copying Pin
Michael Dunn4-Nov-01 15:08
sitebuilderMichael Dunn4-Nov-01 15:08 
Generalneed help quicky - MFC Pin
4-Nov-01 10:29
suss4-Nov-01 10:29 
GeneralRe: need help quicky - MFC Pin
Christian Graus4-Nov-01 10:37
protectorChristian Graus4-Nov-01 10:37 

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.