Search:

Type: Posts; User: dwhitney67; Keyword(s):

Page 1 of 10 1 2 3 4

Search: Search took 0.05 seconds.

  1. Re: Problem compiling C program with GCC with -m32

    Try installing the 32-bit versions of the X11 libraries:


    $ sudo apt-get install libx11-6:i386
  2. Kubuntu 16.04 stalls while during boot phase

    Hello everyone,

    Recently I rebooted my HP 15-bsO16dx laptop following the auto-installation of updates (one of which was probably a new kernel). The reboot stalls. I was able to disable the splash...
  3. Replies
    4
    Views
    5

    Re: c++ efficiency subject

    The copy-constructor is not called in example 1, much less in any of the examples.

    In fact, only the std::string constructor that accepts a const char* is ever called when the toString() is...
  4. Replies
    1
    Views
    2

    Re: Segmentation fault

    A few comments:

    1. The statement srand((unsigned) time(NULL)) should only be called once in your application (preferably outside of the thread).

    2. You should check to verify that the...
  5. Replies
    1
    Views
    2

    Re: C Segmentation Fault Pthreads

    Compile your code with the -g option; this will include symbolic info within your executable so that you can determine where the code is crashing.

    Next, set your core file size to unlimited before...
  6. Re: Create threads just once to use them n times later in C pthread

    Look into developing/using a thread-pool. Read this: https://en.wikipedia.org/wiki/Thread_pool

    Also, I recommend using C++ or some higher-order programming language, rather than C, because the...
  7. [SOLVED] Re: C++ new feature that I cannot understand

    Perform a google search on "singleton design pattern C++". Maybe then you will be enlightened as to the inner workings of the code your are dealing with.
  8. Replies
    4
    Views
    5

    Re: advice on how to free memory leak

    You can't make changes, or you just don't want to??? Are the coding police preventing you from making code changes?

    My advice is to use a shared pointer (per the advice that was given to you...
  9. Re: A little trouble with the system function

    Interesting (and correct) expression. I however like to use the term 'preferably', especially when dealing with newbies to C++/C/Python/Java/etc.
  10. Replies
    13
    Views
    14

    Re: Finish learning python or learn C++

    Then you pretty much limit yourself to a Windows environment. Learning a more general language would have loads of more benefit than C#. Java for instance would be better.
  11. Replies
    13
    Views
    14

    Re: Finish learning python or learn C++

    Study both at the same time!
  12. Re: getting a return value from another program in C

    What value did you get??

    You should read the man-page for wait (man 3 wait).

    In case you are still stuck, here's a trivial example:


    #include <unistd.h>
    #include <sys/wait.h>
    #include...
  13. Replies
    16
    Views
    834

    Re: advise on web development in c++

    You lost me on your argument above. How can you say that both examples shown above are "equivalent"? Either you erred in your statement, or you haven't a clue what you are arguing about.

    What...
  14. Replies
    6
    Views
    361

    [SOLVED] Re: Search C string for semicolon

    Here's an exploit that was not covered in the previous responses. Try running your program without any arguments (i.e. no filename).

    Notice how the program generates a segmentation violation.
    ...
  15. Replies
    4
    Views
    333

    [SOLVED] Re: Ubuntu Java bug

    A "main class not found" implies that you have not set up your CLASSPATH. Unload-able (is that a word?) is not an error I'm familiar with. Perhaps you built your app using version of JDK that is...
  16. Replies
    4
    Views
    494

    [SOLVED] Re: g++ can't find standard library

    My $0.02.... don't use std_lib_facilities.h. It is not a standard header file, and thus you will not find it on any computer (unless you install it yourself).

    Why not open up the file to see what...
  17. Multiple Issues after Upgrading to 16.04 LTS from 14.04 LTS

    I am using the KDE desktop manager (i.e. Kubuntu). Here are the issues I have seen thus far:

    1. My 14.04 KDE settings (located in ~/.kde) are not supported and/or not read by 16.04.

    2. KDE...
  18. Re: C. average from string problem with strtok.

    The segmentation fault is likely occurring because you are operating on a (const) string literal.

    If you read the man-page for strtok(), ironically in the section entitled BUGS, you will see that...
  19. Re: how to do binary operation on char or hex number?

    An unsigned char value can range from 0 to 255; in hex, the equivalent range is 0x00 to 0xFF. This transformation can easily be achieved using printf() (or other functions such a sprintf()).

    You...
  20. Re: how to do binary operation on char or hex number?

    The mapa2() function is attempting to treat the given parameters as if they were an array of unsigned bytes. This is incorrect; each parameter value is a single 8-bit value.

    To examine the...
  21. Replies
    3
    Views
    525

    Re: ld returned 1 exit status

    You are working with an old Makefile that is making a bad assumption regarding the ordering of object files versus that of shared-object libraries. If your Makefile has a LIBS definition, ensure...
  22. Replies
    12
    Views
    590

    Re: calling superclass operator+

    Undoubtedly as you already know, there are multiple ways to solve a problem. However, it is common practice to define overloaded operator method as a manipulator of the object. If you want to...
  23. Replies
    12
    Views
    590

    Re: calling superclass operator+

    Chuchi,

    I'm not sure where you learned about implementing overloaded operator methods, but either you referenced a poorly written tutorial or you missed part of the concept.

    The overloaded...
  24. Replies
    3
    Views
    498

    [SOLVED] Re: Trying to run a makefile

    Btw, your Makefile does not require the executable bit enabled on it. Typically a Makefile only has read-write permissions. Earlier when you indicated that when you ran your Makefile such as...
  25. [SOLVED] Re: gdb ./sysdeps/ieee754/dbl-64/s_sin.c: No such file or directory.

    Use 'next' to execute the next statement in your code; only use 'step' to enter a function. Once inside the function (if possible), then you should resume using 'next'.

    Btw, you should look into...
Results 1 to 25 of 250
Page 1 of 10 1 2 3 4