User Profile

Collapse

Profile Sidebar

Collapse
randomcz
randomcz
Last Activity: Jul 26 '07, 06:37 AM
Joined: Oct 30 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • randomcz
    started a topic Using C++ to read a data file stored in 16-bit format
    in C

    Using C++ to read a data file stored in 16-bit format

    Hi,


    I am trying to use C++ to read a file stored in 16-bit format. It looks like :
    "D6 CD 2F 01 52 07 01 00-52 07 01 00 52 07 01 00" under a hex editor.

    The first variable have 4 bytes: "D6 CD 2F 01". It essentially reprents "19910102"
    the second variable have 1 byte...etc.

    So the problem is how to read it using C++?


    THanks,...
    See more | Go to post

  • randomcz
    replied to How to detect the white space?
    in C
    As far as i know, substr() needs to specify the start of sub string and the length. How to do it in a more general way?

    Can you explain more?
    See more | Go to post

    Leave a comment:


  • randomcz
    started a topic How to detect the white space?
    in C

    How to detect the white space?

    Hi there


    I met a problem like:

    string s, s1, s2;
    s="abc def";

    what I want to is to assign "abc" to s1 and "def" to s2. So I came to the question how to detect the white space within a string.

    Thanks,
    Z
    See more | Go to post

  • randomcz
    replied to Generating random number using C++
    in C
    Thanks, it works.
    See more | Go to post

    Leave a comment:


  • randomcz
    started a topic Generating random number using C++
    in C

    Generating random number using C++

    hi,

    i need help with generating random numbers;

    The task is to generate hundreds of random vectors, like
    1,3,5,6,7
    2,4,5,4,8
    ...

    I used the current time as the random seed, but it turns out
    that every vector to be the same. I guess the problem arise
    because the precision of time function limits to 1 second,
    and in a very short time interval, the random seed is...
    See more | Go to post
No activity results to display
Show More
Working...