Search:

Type: Posts; User: Zeus_

Page 1 of 7 1 2 3 4

Search: Search took 0.01 seconds; generated 2 minute(s) ago.

  1. Replies
    10
    Views
    129

    Awesome! Now, as John mentions, a lot of code is...

    Awesome! Now, as John mentions, a lot of code is not needed. Look at post #8 and try fixing your code...
  2. Replies
    10
    Views
    129

    If you expect to return a pair where your return...

    If you expect to return a pair where your return type is int, then obviously you'd get an error. Also, you're using wrong brackets in the return statement.

    Change this:



    int playgame()

    ...
  3. Replies
    14
    Views
    264

    It took me almost 10 mins to download the ZIP of...

    It took me almost 10 mins to download the ZIP of the repository :frown:. Comparing this to downloading a 100 MB game that takes about 7 seconds, I can only imagine how hugely giga-monolithic it is....
  4. Replies
    10
    Views
    129

    int main (void) { int i = 0; pair...

    int main (void)
    {
    int i = 0;
    pair <int , int> scores [10];
    int SumOfScoresOfComp1 = 0;
    int SumOfScoresOfComp2 = 0;
    while(i < 10)
    {
    scores[i] =...
  5. Replies
    18
    Views
    269

    Difference between %d and %i format specifier in...

    Difference between %d and %i format specifier in C language - GeeksforGeeks

    Maybe this will help.
    I don't see a lot of people using %i...

    Also, why is it this?


    for (int i = 0; i < len -...
  6. BoostWindowsQuickRef - CodeBlocks...

    BoostWindowsQuickRef - CodeBlocks

    This is where I learnt set up for Boost for my C::B. That link should, I think, have everything you need.
  7. Replies
    18
    Views
    269

    The format specifier for int is %d. Format...

    The format specifier for int is %d.

    Format Specifiers in C

    EDIT: Lol, why the delete ;). There's nothing to be worried. No one will judge you and even if they do, it doesn't matter. We're all...
  8. Replies
    14
    Views
    264

    > The basic meaning of + is not an overload and...

    > The basic meaning of + is not an overload and they are definitely intrinsic to the compiler. They are pretty much just single assembly code instructions since the basic types correspond generally...
  9. Replies
    14
    Views
    264

    Are the implementations of the operator overloads...

    Are the implementations of the operator overloads for basic types like int, float, char etc present in the STL in some header files or is it intrinsic to the compiler? If the implementations are...
  10. Replies
    9
    Views
    137

    Thanks for clearing that! It's technically the...

    Thanks for clearing that! It's technically the same but not same, I see. @HelpMeC, sorry for the wrong info.

    @laserlight, can you link me to the C Standard you use? I think I have the wrong one...
  11. Replies
    4
    Views
    98

    > He can use google himself. Damn, why you so...

    > He can use google himself.

    Damn, why you so salty most of the time?

    He mentions "I didn't find a lot of good and complete examples of generic data structures in C, so maybe someone here can...
  12. Replies
    9
    Views
    137

    > Both of the main functions are the same - In...

    > Both of the main functions are the same - In what manner they are the same?

    In the first main, you've written c = ((a - 2) / 2) in one line. In the second main, you've written c = a - 2 in one...
  13. Replies
    4
    Views
    98

    C doesn't have the kind of support C++ has for...

    C doesn't have the kind of support C++ has for generic data structures. templates in C++ are a very, very, very powerful tool for generic implementations.
    I googled and tried to find something good...
  14. Replies
    9
    Views
    137

    First thing, both your main functions are the...

    First thing, both your main functions are the same.

    An integer on most systems I've used is 4 bytes so let's consider it to be 4 bytes for now. 4 bytes is 32 bits where each bit can be a 0 or 1...
  15. Replies
    4
    Views
    96

    Yea..... I don't know why I never did that in any...

    Yea..... I don't know why I never did that in any of my programs when I first wrote them, but I'll change them to not assume that the Stack/Queue/Tree/CircQueue is not empty. Actually, when I started...
  16. Replies
    4
    Views
    96

    Custom stack problems

    Since a lot of people have been posting about Linked Lists and Stacks and Queues recently, I thought of paying visit to one of my old Stack programs (I have three more for Queues, Circular Queues and...
  17. Replies
    18
    Views
    269

    > BTW, %s doesn't get whitespaces? Nope, you'd...

    > BTW, %s doesn't get whitespaces?

    Nope, you'd probably have to do something like scanf ("%[^\n]s", string) to input a string with spaces until the user hits enter

    > I didn't use the %[^\n]...
  18. Replies
    18
    Views
    269

    scanf reads until it encounters a whitespace, a...

    scanf reads until it encounters a whitespace, a newline or an eof character. So, when you type in that space b/w 1 and 0.55, scanf stops taking in input for the first float (which is 1 and also your...
  19. Replies
    12
    Views
    164

    > What's wrong with this scenario? That I'm...

    > What's wrong with this scenario? That I'm trying to point to some integer value which does not really exist in the memory as integer?

    Yes, text[i] + '0' produces a temporary and you cannot take...
  20. Replies
    12
    Views
    164

    text[i] is a character as she explains, not an...

    text[i] is a character as she explains, not an integer.

    Write a simple program to understand characters.



    char c = '1';

    cout << c << " " << (int) c;
  21. Replies
    14
    Views
    264

    Can't blame y'all. I myself don't remember what...

    Can't blame y'all. I myself don't remember what his name was and can't find him either. Neither is my YouTube watch history useful as I cleared it up some time. I can get the syntax to work with some...
  22. Replies
    14
    Views
    264

    What you say makes sense, and I had the same...

    What you say makes sense, and I had the same question. He probably wrote the code for it in a way such that once the variable is no longer used further in the program, display it as deleted with the...
  23. Replies
    14
    Views
    264

    > when a possible creation of an instance...

    > when a possible creation of an instance (Debug()) was right there to see.

    If Debug was his class, he would have probably done something like "Debug D" and then D << Perks, I think. Can you...
  24. Replies
    6
    Views
    151

    Ignore this. This is just me being stupid....

    Ignore this. This is just me being stupid. @Hodor, you're completely right. With the exception of static objects, it would be right saying "typically the case for statically allocated variables". I...
  25. Replies
    14
    Views
    264

    I forgot to mention that he includes this file at...

    I forgot to mention that he includes this file at the beginning after he wrote that line of code: "#include "CppDebug.h"

    Also, I'm not clear about whether it was "Debug () << Perks" or "Debug <<...
Results 1 to 25 of 165
Page 1 of 7 1 2 3 4