Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: clow

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    17
    Views
    341

    Re: Help! free() invalid pointer error

    one last question.. when I attempt to NULL terminate I get this compilation error:



    error: invalid operands to binary * (have ‘uint8_t ** {aka unsigned char **}’ and ‘uint32_t {aka unsigned...
  2. Replies
    17
    Views
    341

    Re: Help! free() invalid pointer error

    sorry it worked.. I was trying to debug optimized code I think
  3. Replies
    17
    Views
    341

    Re: Help! free() invalid pointer error

    declared before function:



    uint8_t* message = NULL;


    passed into function:
  4. Replies
    17
    Views
    341

    Re: Help! free() invalid pointer error

    Hi 2kaud,

    The memcpy seems not to work in your code above. "message" is passed is as:



    uint8_t** message


    when I run the code and look at "*message" in the debugger, there is nothing...
  5. Replies
    17
    Views
    341

    Re: Help! free() invalid pointer error

    Victor, I don't understand what you are asking?
  6. Replies
    17
    Views
    341

    Re: Help! free() invalid pointer error

    message is passed in as:



    uint8_t** message


    The code works if I malloc (size+1) and recv (size+1)....
  7. Replies
    17
    Views
    341

    Re: Help! free() invalid pointer error

    one interesting thing to note that "bytes" is 35 when ret is 35.. however bytes is 37 when ret is 36..

    I imagine my snprintf is messed up somehow.

    Anyone know what I did incorrect?

    Thanks!
  8. Replies
    17
    Views
    341

    Help! free() invalid pointer error

    Hello all,

    I have code to read in a message via tcp/ip as show below:



    // keep reading until "size" bytes received
    bytes = 0;
    while(bytes < size)
    {
  9. Re: C Question: I want to convert an int to string of size n and pad with 0's.

    lol super confused, can you provide example code?
  10. C Question: I want to convert an int to string of size n and pad with 0's.

    Hello,

    I have an int with a value say "1234" and I want that int to be a string like this with 8 bytes:



    00001234


    I have this working with a string of size 8 like this:
  11. Re: C question: converting int to string and back

    You guys are both fast and great help :) Thanks!
  12. [RESOLVED] C question: converting int to string and back

    Hello,

    I want to convert an int to char[] array that is 8 bytes long, and I want to pad the array with 0's if the number to convert is less than 8 characters. For example:

    1234 would be...
  13. Replies
    1
    Views
    318

    String concatenation in C error

    Hello,

    I have the following code:



    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>
  14. Replies
    3
    Views
    419

    simple tag parsing in C?

    Hello,

    In C I have a char* that looks like this:



    char* text = "<tag1>3143523532</tag1><tag2>this is a test</tag2><tag3>another test!!</tag3>"


    and I have the variables:
  15. Re: C programming and Linux shared library question

    do you have an example of how to use shared memory for my sample code?
  16. C programming and Linux shared library question

    Hello,

    I created a shared library in Linux like this:

    mysharedlib.h:



    int test;
    void PrintTestValue();
  17. Replies
    1
    Views
    396

    Binary Search Tree DeleteNode() problem

    Hello,

    Below is my implementation of a Binary Search Tree, but there is a bug in the DeleteNode() function. It does not set the parent's pointer to NULL as I intended. Can anyone explain why this...
  18. Re: how to convert vector to std:string ?

    Yes. Is the way I posted above the best way?
  19. Re: how to convert vector to std:string ?

    unsigned char*.

    Right now I think I figured out a way, but it might not be optimal:



    string temp;
    for(vector<unsigned char*>::iterator it = vec.begin(); it != vec.end(); it++)
    ...
  20. how to convert vector to std:string ?

    Hello I have a vector<unsigned char*> and I want to convert it to a std::string. How can I do that?
  21. how to convert vector to vector ?

    Hello,

    I have a vector<vector<unsigned char> > and I want to convert it to a vector<unsigned char*>. Can anyone provide sample code of how this is done?

    Thanks!
    Charles
  22. [RESOLVED] multiple dialogs supported in one derived CDialog class?

    Hello,

    In my class:



    class SettingsDialog : public CDialogEx


    I have:
  23. Replies
    6
    Views
    934

    Re: Radio Button help needed

    Putting UpdateData() at the beginning of the handler had mixed results. First when I click IDC_RADIO_TWO then IDC_RADIO_THREE is selected. Also, IDC_RADIO_ONE stays selected also, until I move my...
  24. Replies
    6
    Views
    934

    Re: Radio Button help needed

    So where do I call UpdateData() at exactly? I changed the code to:



    void RadioDialog::OnBnClickedRadioSelection()
    {
    if(iRadioSelection_== 0)
    {...
  25. Replies
    6
    Views
    934

    Radio Button help needed

    Hello,

    I have a group of 3 radio buttons with IDs:



    IDC_RADIO_ONE
    IDC_RADIO_TWO
    IDC_RADIO_THREE
Results 1 to 25 of 32
Page 1 of 2 1 2


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a Codeguru.com survey!


HTML5 Development Center