hulla's Profile User Rating: *****

Reputation: 49 Craftsman
Active Members
Active Posts:
740 (0.39 per day)
05-March 11
Profile Views:
Last Active:
User is offline Apr 10 2016 12:11 PM

Previous Fields

OS Preference:
Favorite Browser:
Favorite Processor:
Favorite Gaming Platform:
Your Car:
Who Cares
Dream Kudos:

Latest Visitors

Icon   hulla _

Posts I've Made

  1. In Topic: exit(0)

    Posted 21 May 2015

    Does renaming the function to something else than exit fix it, because the compiler might be getting confused with your function, and exit()
  2. In Topic: ISO C++ forbids compari btwn ptr and int, for my types

    Posted 18 Jul 2014

    Sorry for the late reply, I often have trouble logging into DIC (Login page goes completely blank often), finally worked today.

    I'm using CodeBlocks 13.12, GNU GCC. Oh damn, can't chain the >. Guess I'll have to settle for the >> then. :(

    I was trying to chain the addChild function to make it simple for me to create working directories, that's all lol. Turned out to be an extremely intriguing issue.

    I wasn't using the comparison operator for any particular reason at all, I picked it randomly off the top of my head. I'll touch up some of my code on it now
  3. In Topic: Optimizing Word Generator

    Posted 27 May 2014

    Hey man.

    In your C++ program, the for-loop:
    for(int i = 0; i < amount; i++){

    uses i++.
    You don't need to use the post-fix increment so you should use prefix instead.

    Here's a link that might give some relief Prefix vs Post-fix performance

    HOWEVER, your compiler may in some cases optimize the temp variable away. (See: Optimization of post-fix)
  4. In Topic: Operator >> in ifstream.

    Posted 22 May 2014

    I'm pretty sure this would work:
    using namespace std;
    string dummy, data;
    ifstream infile;
    getline(infile, dummy);
    // You've skipped the first line now
    infile >> data;
  5. In Topic: Adding To Score every second

    Posted 19 May 2014

    Hey there!

    I believe something like this is what you're looking for:

    #include <iostream>
    #include <Windows.h> // Win only (A few people will stop reading at this point)
    using std::cout;
    using std::endl;
    using std::cin;
    int main()
        char keyPress = 0;
        bool release = true;
        int cookieCount = 0;
        cout << "[Intro]Press esc to stop playing." << endl;
        for(int i=0; !GetAsyncKeyState(VK_ESCAPE); ++i)
            if(i % 50 == 0) // If i is divisible by 50 (After 1 second has passed), add one to cookie automatically
            if(GetAsyncKeyState(VkKeyScan(99)) && release)
                cout << "Added a cookie!" << endl;
                release = false;
                release = true;
            Sleep(20); // With a sleep time of 20
        cout << "Thanks for playing Cookie.. Yeah." << endl
             << "Well anyways you got " << cookieCount << " cookies !" << endl
             << "Press enter to exit." << endl;
        cin.ignore(2e9, '\n');

    Let's take a look at the code.
    Line #17 checks if a second has passed, and if it has, it automatically adds one to the total number of cookies obtained.
    Line #12 declares a very useful variable release that ensures the user isn't just keeping hold of the C and scoring 51 cookies a second without inflaming his index finger. This is because the C key must be released in order for a cookie to be obtained again. I believe this makes the maximum obtainable cookies per second 26, which is pretty decent.

    My program uses GetaSyncKeyState() calls. These are Windows only. Linux users won't approve. At all. I can't find or think of anything else that would work for all platforms, and give the same result. Checking whether a key is down or up etc.

    Work around with this code a little to obtain what you need. :)

My Information

Member Title:
Writing Lines
18 years old
July 7, 1997
Years Programming:
Programming Languages:
C++, Java, Lua

Contact Information

Skype  zulfi49


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

    jesicalbaby Icon

    16 Sep 2013 - 14:24
    My name is Miss jesical,
    i saw your profile today
    and,i fill more interest to contact you ,
    i will like you to please send me
    an email via ([email protected])
    for me to send you my picture
    [email protected]
  2. Photo

    ishkabible Icon

    22 Nov 2011 - 22:16
    "esoteric" means only relevant to a few, and hacks in the sense i used just means a dubious way of doing something. see
    a purely function language is a language that has no inherent means to interact with the outside world. check out Haskell; the joke is that i find purely functional programing difficult so i compare it to north...
  3. Photo

    smohd Icon

    11 Oct 2011 - 02:04
    Hi, it is a badge given out by team member to those who participate in Introduce Your Self to welcome new members to the team. Read more:
  4. Photo

    ishkabible Icon

    26 Sep 2011 - 06:53
    post a question about it in the forums, i will be sure to help you :)
  5. Photo

    rdhc1330 Icon

    22 Sep 2011 - 00:44
    where I live, Rodney District HardCore haha.... Farm land :(
  6. Photo

    EnvXOwner Icon

    15 Sep 2011 - 03:10
    No, it's the type of car that I prefer though :)
  7. Photo

    mb2000inc Icon

    13 Sep 2011 - 09:01
    Thanks, it's completely true. Especially today.
  8. Photo

    PlasticineGuy Icon

    06 Sep 2011 - 04:00
    > anti-religious activities.
    Atheism in general, or hate speech directed towards religious groups (not Scientology)?
  9. Photo

    heyoman1 Icon

    04 Sep 2011 - 10:40
    Through the currently active Brogramming thread under the Caffiene Lounge.
  10. Photo

    xclite Icon

    02 Sep 2011 - 07:38
  11. Photo

    Ecstatic Icon

    01 Sep 2011 - 22:46
    I am native Pakistani :)
  12. Photo

    NeoTifa Icon

    26 Aug 2011 - 05:05
    "Screw ... anti-religious activities." Is that why you downvoted my perfectly logical argument? GAY!
  13. Photo

    PlasticineGuy Icon

    22 Aug 2011 - 16:37
    Sounded rude to me.
  14. Photo

    PlasticineGuy Icon

    15 Aug 2011 - 03:43
  15. Photo

    PlasticineGuy Icon

    14 Aug 2011 - 04:04
    Yes, that's why you can use << and >> (they're overloaded operators). Think that somewhere in iostream lies the following code:
    class ostream: public basic_ostream {
    // some code
    } cout;
    class istream: public basic_istream {
    // some code here
    } cin;
  • (3 Pages)
  • +
  • 1
  • 2
  • 3