Search:

Type: Posts; User: vangmor

Search: Search took 0.01 seconds.

  1. Thread: Info Theory

    by vangmor
    Replies
    4
    Views
    1,302

    Thanks SilentStrike!

    Thanks SilentStrike!
  2. Thread: Info Theory

    by vangmor
    Replies
    4
    Views
    1,302

    Info Theory

    We have 14 discrete symbols s1, s2, s14. Each symbol haves the probability p1, p2, , p14 respectively, to be transmitted. Is the average transmitted information in bits (p1*log2(1) + p2*log2(2). ...
  3. Replies
    4
    Views
    2,154

    One way is to use linked lists typedef...

    One way is to use linked lists


    typedef struct tag_linked_list_node
    {
    char *code; //use malloc to allocate memory for code or write char code[SMALL_SIZE]; or int code;
    ...
  4. Replies
    41
    Views
    3,701

    Generaly you cant. Win 32 API is different from...

    Generaly you cant. Win 32 API is different from Ansi C / C++ libraries API. Only functions which not contain any console i/o function are portable to win 32, but win 32 offers its own functions...
  5. Replies
    7
    Views
    1,495

    I couldnt read your function so i wrote my...

    I couldnt read your function so i wrote my version...



    #include <stdio.h>
    #include <string.h>

    int remove_substring(const char strToFind[], const char strToSearch[], char strModified[], char...
  6. Replies
    4
    Views
    806

    If you store the values as ints or floats or the...

    If you store the values as ints or floats or the correct type no...
    //value = int type
    *((int*)(block_pointer + sizeof(int))) = int_value;
    //Next value = double...
    *((double*)(block_pointer +...
  7. Replies
    7
    Views
    988

    There is not absolutely nothing to worry. String...

    There is not absolutely nothing to worry. String literals in C/C++ are always null terminated char* const. Two continius string literals concaternated in one "ABC" "DEF" -> "ABCDEF"
    Maybe your...
  8. Replies
    7
    Views
    789

    Tip: in equality checking expretions put the...

    Tip: in equality checking expretions put the value (if any) on the left.
    10 == var because on error typing '==' like 10 = var -> ERROR! lvalue required.... but var = 10 is a legal assigment...
  9. if you dont want to change int code = 0 to char...

    if you dont want to change int code = 0 to char code = '0' or case '1' to case 1: write:
    case '1'-'0': ...
    case '2'-'0': ...
    ...
    its funny
  10. Replies
    4
    Views
    27,807

    int a, i = 5.156546; i = 5 because i is integer....

    int a, i = 5.156546;
    i = 5 because i is integer.
    try
    int a;
    double d = 5.156546;
    a = (int) d;
    or print
    printf("%.0f\n", d);
  11. Replies
    7
    Views
    1,379

    try if( index < strlen(str) && index >=...

    try


    if( index < strlen(str) && index >= 0) /*be sure...*/
    while( str[index] != '\0' && str[index++] != '(' );
  12. Thread: 2 Words

    by vangmor
    Replies
    8
    Views
    1,065

    try this function int GetFirstWord(char...

    try this function



    int GetFirstWord(char *line, char* firstword)
    {
    int i = 0, j =0;
    while(line[i] <= ' ' ) /*Left trim*/
    i++;
Results 1 to 12 of 12