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

Reputation: 1162 Grandmaster
Group:
Expert
Active Posts:
4,787 (1.97 per day)
Joined:
09-June 09
Profile Views:
31,736
Last Active:
User is offline Feb 01 2016 08:00 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: Raising to a negative power in C

    Posted 31 Jan 2016

    Also, raising to the negitive power is the same as the inverse of the result of raising the the positive power.

    x-n = 1 / xn
  2. In Topic: Winsock2 - IRC bot not connecting to server

    Posted 31 Jan 2016

    You need to call WSAStartup() before performing any networking in winsock. Typically this is the first function call in main

    WSAStartup = Windows Socket API Startup


    It's ridiculous, but necessary. Good ol' windows.
  3. In Topic: Passing float arrays resulted in wrong array size?

    Posted 28 Jan 2016

    Pointers are not arrays. The sizeof a pointer on a 32-bit system is 4 (bytes). You must pass the size of the array as a parameter to the function which you are passing the array to.

    i.e.
    
    void printArray(int *arr, int size) {
       while(size--) {
          std::cout<<*arr++<<" ";
       }
    }
    
    int main() {
       int arr[5] = {1,2,3,4,5};
       
       printArray(arr, sizeof(arr) / sizeof(arr[0]));
    
       return 0;
    }
    
    
  4. In Topic: while multiple condition help

    Posted 27 Jan 2016

    Quote

    false || ( this can be anything, the code will never get here)
    
    


    I think you mean the AND operator there. ^

    The OR operator is sometimes hard to think about, sometimes it's easier to negate the condition and see if the opposite makes sense (when the loop should break).

    Taking this condition
    ispunct(*s) || parser_comment_level != 0 || *s != '\0'
    
    


    Negating it will give
    ispunct(*s) == false && parser_comment_level == 0 && *s == '\0'
    
    


    This is the condition which must be true for the for loop to break, ask yourself, does this seem valid?
  5. In Topic: [C++] Number of Days in Year

    Posted 27 Jan 2016

    Just because you crammed all of the logical conditions onto a single line does not make the code more efficient or elegant, it makes it unmaintainable and sloppy.

    If you ever find yourself nesting ternary operators, there is a better way to do it.

My Information

Member Title:
Engineer
Age:
25 years old
Birthday:
February 9, 1990
Gender:
Location:
California
Years Programming:
10
Programming Languages:
C/C++

Contact Information

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

Comments

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

    mireille4U Icon

    30 Apr 2015 - 05:46
    Greeting from mireille i saw your profile today and i became interested in you and i will like to know more about you and if you can mail an email to my mail address ([email protected]) i will give you my picture.here is my mail address i hope we can move from here.above. Mireille
  2. Photo

    tarmizi_adam2005 Icon

    05 Feb 2014 - 07:11
    999 reps, that's a nice number jjl !
  3. 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.
  4. Photo

    thekooiman Icon

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

    osu1 Icon

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

    Xupicor Icon

    23 Nov 2012 - 02:08
    666 rep, you are now officially hell of an expert. ;)
  7. 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!
  8. Photo

    Dogstopper Icon

    01 Jan 2011 - 21:18
    Sorry about the accidental downrep!
  9. 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?
  10. Photo

    skyhawk133 Icon

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

    teetaaa222 Icon

    01 May 2010 - 09:10
    hi i want to ask u a question please
  12. 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..
  13. 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 [email protected] as soon as possible
  14. Photo

    reem alflaa Icon

    14 Apr 2010 - 00:16
    pleas help me for program
    [email protected]
  15. 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..
  • (2 Pages)
  • +
  • 1
  • 2