jjl's Profile User Rating: *****

Reputation: 1074 Grandmaster
Group:
Expert
Active Posts:
4,533 (2.35 per day)
Joined:
09-June 09
Profile Views:
23,660
Last Active:
User is offline Sep 15 2014 11:27 PM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Mac
Favorite Browser:
Chrome
Favorite Processor:
Intel
Favorite Gaming Platform:
XBox
Your Car:
Toyota
Dream Kudos:
500

Latest Visitors

Icon   jjl meow

Posts I've Made

  1. In Topic: TCP server/multiple client with select process and forking

    Posted 15 Sep 2014

    forking seems like overkill, select can tell you when a user wants to send something as well as when the client has received something. Just add the stdin and the server file descriptor to the select file descriptor set.
  2. In Topic: How do you null terminate a short?

    Posted 24 Jul 2014

    Are you attempting a C string into a short? A short is typcially two bytes, which would only leave you one byte for the character, and one for the NULL terminator. Doesn't really make much sense.
  3. In Topic: array of char* as function argument

    Posted 30 Jun 2014

    You cannot determine the size of an array simply based on a pointer.

    You have a few options:

    1) Pass the size of the array as a parameter
    2) Pass a vector of char* (instead of an array)
    3) Create your own struct which encapsulates the array of strings with the size
    4)...
  4. In Topic: The Best Data Structure for a Dispatcher?

    Posted 12 Jun 2014

    I would be easier to answer your question if you explained why you need three separate queues.
  5. In Topic: Getting the size of an array

    Posted 12 Jun 2014

    sizeof give the size in bytes, however your number's array is of type int.

    Therefore, to get the number of elements in your array you need.

    sizeof(numbers) / sizeof(int)
    
    


    It looks like your numbers array is decaying to a pointer, therefore sizeof(numbers) evaluates to 4 bytes (since a pointer is 4 bytes on a 32 bit system). Try explicitly allocating memory for numbers.

    int numbers[6] = {8, 2, 0, 4, 100, 5};
        for(int i = 0; i < sizeof(numbers) / sizeof(int); i++){
                cout << numbers[i] << endl;
            }
    
    

My Information

Member Title:
Engineer
Age:
24 years old
Birthday:
January 9, 1990
Gender:
Location:
California
Years Programming:
6
Programming Languages:
C/C++, Java, MIPS assembly, VHDL, AVR C

Contact Information

E-mail:
Private
Website URL:
Website URL  http://

Comments

  • (2 Pages)
  • +
  • 1
  • 2
  1. Photo

    tarmizi_adam2005 Icon

    05 Feb 2014 - 07:11
    999 reps, that's a nice number jjl !
  2. Photo

    CODER IT Icon

    04 Dec 2013 - 00:54
    HI . may i ask something ? please do message me .We are assign to do a thesis and were going to choose 1 out of this 3 systems .
    -- Pharmacy Automation System
    -- Online voting system
    -- Internet Cafe System
    but the problem is , we doesnt know how to make programs in making this systems.
  3. Photo

    thekooiman Icon

    27 Mar 2013 - 18:08
    Thank you for all the help and insightful explanations!
  4. Photo

    osu1 Icon

    04 Mar 2013 - 17:26
    thank you for your help!
  5. Photo

    Xupicor Icon

    23 Nov 2012 - 02:08
    666 rep, you are now officially hell of an expert. ;)
  6. Photo

    Tom_Leonardsson Icon

    26 Apr 2012 - 01:19
    http://www.dreamincode.net/forums/topic/276888-sdl-problem-the-bmp-enemy-wont-show/page__p__1609097__fromsearch__1&#entry1609097 help...please!
  7. Photo

    Dogstopper Icon

    01 Jan 2011 - 21:18
    Sorry about the accidental downrep!
  8. Photo

    Atty Icon

    03 Dec 2010 - 09:17
    Hi there.. I saw one of your posts regarding Opengl On PictureBox Toolbox In Visual Studio 2008.Net, can you help me on how should I do it?
  9. Photo

    skyhawk133 Icon

    24 May 2010 - 09:54
    Congrats on your promotion to Expert!
  10. Photo

    teetaaa222 Icon

    01 May 2010 - 09:10
    hi i want to ask u a question please
  11. Photo

    sweetcuty Icon

    28 Apr 2010 - 08:57
    hi ..i have send code of knapsack problem by dynamic programming approach..plz help to find out the memory used by this program..
  12. Photo

    esu20032001 Icon

    19 Apr 2010 - 04:03
    I need help please help me in changing this code to C language
    int balance;
    cout << "Balance : " << setw(15)<< setprecision(2)<< setiosflags(ios::left)<< setiosflags(ios::showpoint)<< setiosflags(ios::fixed)<<balance;
    pls send it to me esu20032001@gmail.com as soon as possible
  13. Photo

    reem alflaa Icon

    14 Apr 2010 - 00:16
    pleas help me for program
    reemaz-cat@hotmail.com
  14. Photo

    pari-pari Icon

    11 Apr 2010 - 19:03
    hello..
    can i ask u something??
    i've learned in my c programming class,
    but i still don't understand,
    what is the meaning by this statement :
    1+(rand()%6);
    thank you..
  15. Photo

    najlala Icon

    09 Apr 2010 - 00:36
    ive post something and i need ur help mind checking whats my mistake?
  • (2 Pages)
  • +
  • 1
  • 2