Output console
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Output console

  1. #1
    Join Date
    Dec 2003
    Posts
    2

    Output console

    I am writing a programme that outputs all the characters from 32-255. but this is what my console gave me...How can i fix the problem ?
    Thanks,
    SignOut
    Attached Images Attached Images  

  2. #2
    Join Date
    Dec 2003
    Posts
    2
    My code looks like this:
    PHP Code:
    for(int i=32;i<255;i++){
    cout<<i<<"  "<<(unsigned char)i<<flush;
    //keep little space for each number.
    ........ 

  3. #3
    Join Date
    Aug 2001
    Location
    Stockholm, Sweden
    Posts
    1,664
    How does your print statement look? (It looks like you have forgotten a parameter to printf())

  4. #4
    Join Date
    Jul 2003
    Location
    Maryland
    Posts
    762
    Originally posted by j0nas
    How does your print statement look? (It looks like you have forgotten a parameter to printf())
    He is using C++, not C. He posted his "print statement"

    Anyway, I compiled your code and it works for me (somewhat).

    Code:
    32   33  !34  "35  #36  $37  %38  &39  '40  (41  )42  *43  +44  ,45  -46  .47  /
    48  049  150  251  352  453  554  655  756  857  958  :59  ;60  <61  =62  >63  ?
    64  @65  A66  B67  C68  D69  E70  F71  G72  H73  I74  J75  K76  L77  M78  N79  O
    80  P81  Q82  R83  S84  T85  U86  V87  W88  X89  Y90  Z91  [92  \93  ]94  ^95  _
    96  `97  a98  b99  c100  d101  e102  f103  g104  h105  i106  j107  k108  l109  m
    110  n111  o112  p113  q114  r115  s116  t117  u118  v119  w120  x121  y122  z12
    3  {124  |125  }126  ~127  ?128  129  130  131  132  133  134  135  136
     137  138  139  140  141  142  143  144  145  146  147  148  149  
    150  151  152  153  154  155  156  157  158  ?159  160  161  162  16
    3  164  165  166  167  168  169  ?170  171  172  173  174  175  176
     ?177  ?178  ?179  ?180  ?181  ?182  ?183  ?184  ?185  ?186  ?187  ?188  ?189  ?
    190  ?191  ?192  ?193  ?194  ?195  ?196  ?197  ?198  ?199  ?200  ?201  ?202  ?20
    3  ?204  ?205  ?206  ?207  ?208  ?209  ?210  ?211  ?212  ?213  ?214  ?215  ?216
     ?217  ?218  ?219  ?220  ?221  ?222  ?223  ?224  ?225  226  ?227  ?228  ?229  ?
    230  231  ?232  ?233  ?234  ?235  ?236  ?237  ?238  ?239  ?240  ?241  242  ?24
    3  ?244  ?245  ?246  247  ?248  249  ?250  251  ?252  ?253  254  ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center