Search:

Type: Posts; User: High Voltage

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Okay guys thank you for your suggestions,...

    Okay guys thank you for your suggestions, basically when I think about your suggestions, that is how I would handle it in C, giving pointer as parameter and returning a value.

    In the method decode...
  2. If I decode function returns dynamically...

    If I decode function returns dynamically allocated memory I still have to delete it after function call? What about returning references is that any safer, but then other question raises, since I...
  3. Returning pointer to an object from a method

    Hello C++ experts, I am having a problem with system (microcontroller) stopping after some consecutive method calls, and I am pretty sure it is because of my incorrect pointer handling and corrupting...
  4. I haven't even noticed it. Thank you Salem, I...

    I haven't even noticed it. Thank you Salem, I knew that it was something simple.
  5. Inheritance - expected class name before error

    After searching through google and not being able to fix the problem, I decided to ask here.

    So I am trying to implement inheritance, but unfortunately I am getting compiler error:


    ...
  6. Replies
    2
    Views
    2,553

    Determining size of a byte buffer

    Hello guys, I am implementing my little protocol to send data to from microcontroller to PC via RS232. I would like to know if there is a way to determine size of a buffer passed to a function,...
  7. Replies
    6
    Views
    5,165

    Thank you it compiled now.

    Thank you it compiled now.
  8. Replies
    6
    Views
    5,165

    Salem this is not my code, I copy/pasted it from...

    Salem this is not my code, I copy/pasted it from msdn site as I mentioned at the end of my post. I tried removing stdafx.h and turned off VS option "use precompiled headers"


    about website:...
  9. Replies
    6
    Views
    5,165

    Socket programming in Windows

    Hello C++ experts,

    I would like to ask someone who already used C++ for windows socket programming. I am getting following errors:

    identifier "Winsock" is undefined and many redefinition errors...
  10. Replies
    2
    Views
    3,001

    @Salem thank you.I didn't even notice it, you are...

    @Salem thank you.I didn't even notice it, you are right I mixed up I2CTransmitter and LCDTransmitter classes. I thought all the time that I used LCDTransmitter but instead I wrote I2CTrasnmitter... I...
  11. Replies
    2
    Views
    3,001

    Problem with compiling and constructor

    I am fighting with the GCC compiler, problem occurs in the constructor of the LCD class, when I try to instantiate new LCDTransmitter:


    this->i2cTransmitter = new I2CTransmitter(i2cAdapter);

    ...
  12. Replies
    1
    Views
    2,703

    SOLVED: OK I got it working, The map function...

    SOLVED:

    OK I got it working, The map function was the problem... somehow it didn't map the values right.

    Analog Refrence Voltage is 5V for reading the analog values. And guess what, pin that...
  13. Replies
    1
    Views
    2,703

    Using State Pattern and Joystick

    Hello everyone,
    I am implement using joystick as Password Logger, where Joystick remembers 3 out of 4 UTTERMOST positions, and the combination of the THREE joystick positions represents a PASSWORD....
  14. Replies
    11
    Views
    8,948

    Well some people say that references act as they...

    Well some people say that references act as they were pointers , and depending on the compiler they could be implemented as pointers or not, maybe your compiler doesn't implement it as pointers and...
  15. Replies
    11
    Views
    8,948

    I understood that references can be used as...

    I understood that references can be used as aliases



    class Foo
    {
    private:
    int x;

    public:
  16. Replies
    11
    Views
    8,948

    *this gives us object, but object is just a...

    *this gives us object, but object is just a memory address, as it is any variable in C++, that is what I actually meant, am I right?



    I am aware of that, just trying to understand references
    ...
  17. Replies
    11
    Views
    8,948

    hope I understood you laserlight well, this is...

    hope I understood you laserlight well, this is how I see it now
    https://s1.postimg.org/94pu6wotb/Untitled.pngimage hosting 5mb
  18. Replies
    11
    Views
    8,948

    References

    Hello guys, I am trying to understand the implementation of references in C++, after some research and reading this article: An Insight to References in C++ - CodeProject

    I concluded that...
  19. Thank you algorism, this line: Date...

    Thank you algorism,
    this line:



    Date *date = malloc(sizeof *date);



    Why do you take sizeof pointer, I thought it should allocated like this
  20. Ignore i variable forgot to remove it and also...

    Ignore i variable forgot to remove it and also accidentally put const in free function.

    I don't understand Why do you pass double pointer in free function instead of a single pointer?

    Also why...
  21. Thank you salem. So I can look at function...

    Thank you salem.
    So I can look at function pointers simply as data fields of the class/class variables?

    MyClass.h



    class MyClass
    {
    private:
  22. Alright I have another qeustion. After trying...

    Alright I have another qeustion.

    After trying to call


    nDayOfTheWeek = date->getDay(date, aDate);
    date->Delete(date);


    which are struct functions that are implemented via virtual...
  23. I am using GNU GCC compiler, I don't think I am...

    I am using GNU GCC compiler, I don't think I am allowed to compile in C99 mode because other old programs maybe would not compile in that case.

    I am getting following errors:

    Src/_Date.c: In...
  24. Assigning values to an array data types that are members of a structure in aFunctio

    Hello everyone,
    I am trying to initiliaze Date struct fields that are array type in a function
    Date* new_Date(int day, int month, int year, int i)



    , but I don't know a proper way to do it
    ...
  25. Replies
    6
    Views
    4,204

    Originally it was saved as PNG...

    Originally it was saved as PNG
    https://s11.postimg.org/d1039cy2b/UML_Diagram_I2_C.pngupload pics
Results 1 to 25 of 92
Page 1 of 4 1 2 3 4