www.digitalmars.com         C & C++   DMDScript  

c++ - Help me with strings

reply "Jimmy Lloyd" <jlloyd30 comcast.net> writes:
this is my code for this program:

#include <stdio.h>
#include <stdstring.h>

char char1;
char char2;
char char3;
char char4;
char char5;
char char6;
long int social;
string birth;

void main()
{

  char1 = 'T';
  char2 = 'r';
  char3 = 'a';
  char4 = 'v';
  char5 = 'i';
  char6 = 's';
  printf(char1 << char2 << char3 << char4 << char5 << char6 << '\n');
  social = 6483920349;
  printf(social << '\n');
  birth = 12/10/87;
  printf(birth << '\n');

}#include <stdio.h>
#include <stdstring.h>

char char1;
char char2;
char char3;
char char4;
char char5;
char char6;
long int social;
string birth;

void main()
{

  char1 = 'T';
  char2 = 'r';
  char3 = 'a';
  char4 = 'v';
  char5 = 'i';
  char6 = 's';
  printf(char1 << char2 << char3 << char4 << char5 << char6 << '\n');
  social = 6483920349;
  printf(social << '\n');
  birth = 12/10/87;
  printf(birth << '\n');

}
I keep getting this error:
Fatal error: unable to open input file 'exercise41'
--- errolevel 1
I want to know if my library for my strings is right.
Nov 19 2003
parent "Matthew Wilson" <matthew.hat stlsoft.dot.org> writes:
Is your source file called exercise41.cpp? If so you need to compile with

  dmc exercise41.cpp

and not, as I suspect you are doing,

  dmc exercise41



"Jimmy Lloyd" <jlloyd30 comcast.net> wrote in message
news:bph25t$1vrs$1 digitaldaemon.com...
 this is my code for this program:

 #include <stdio.h>
 #include <stdstring.h>

 char char1;
 char char2;
 char char3;
 char char4;
 char char5;
 char char6;
 long int social;
 string birth;

 void main()
 {

   char1 = 'T';
   char2 = 'r';
   char3 = 'a';
   char4 = 'v';
   char5 = 'i';
   char6 = 's';
   printf(char1 << char2 << char3 << char4 << char5 << char6 << '\n');
   social = 6483920349;
   printf(social << '\n');
   birth = 12/10/87;
   printf(birth << '\n');

 }#include <stdio.h>
 #include <stdstring.h>

 char char1;
 char char2;
 char char3;
 char char4;
 char char5;
 char char6;
 long int social;
 string birth;

 void main()
 {

   char1 = 'T';
   char2 = 'r';
   char3 = 'a';
   char4 = 'v';
   char5 = 'i';
   char6 = 's';
   printf(char1 << char2 << char3 << char4 << char5 << char6 << '\n');
   social = 6483920349;
   printf(social << '\n');
   birth = 12/10/87;
   printf(birth << '\n');

 }
 I keep getting this error:
 Fatal error: unable to open input file 'exercise41'
 --- errolevel 1
 I want to know if my library for my strings is right.

Nov 19 2003