Search:

Type: Posts; User: Zeus_

Page 1 of 4 1 2 3 4

Search: Search took 0.00 seconds.

  1. Replies
    10
    Views
    124

    > The only problem I have with your code is that...

    > The only problem I have with your code is that I should be making it in only one function. I even thought it was impossible to do with only one function, but I'll take a look at how you did it and...
  2. Replies
    10
    Views
    124

    > I have no idea where I may have messed it up. 8...

    > I have no idea where I may have messed it up. 8 returns me 1, but 9 returns me 11. 14 returns me 1, but 15 returns me 17.

    Write down your code and dry run it in your head/paper a few times and...
  3. Replies
    15
    Views
    333

    > You cannot implicitly convert a pointer to a...

    > You cannot implicitly convert a pointer to a String to a reference to a String; that's why you need to dereference the pointer to get a String object for the String reference to refer to.

    Oh, I...
  4. Replies
    15
    Views
    333

    > At this point I don't think you should be...

    > At this point I don't think you should be worrying about inline code, just get your code to compile correctly. Once you start getting into much larger code bases you may want to play with inline....
  5. Replies
    15
    Views
    333

    Inlining

    class String
    {

    private: /* Variables */

    char* m_Text;
    size_t m_Size;

    private: /* Method Declarations and/or Definitions */
  6. Replies
    15
    Views
    333

    > At this stage of your journey you should treat...

    > At this stage of your journey you should treat all warnings as errors and fix them. Once you have gained mastery of the language then maybe you can decide what warnings are not important.

    Will...
  7. Replies
    15
    Views
    333

    > Your "friend" definition doesn't match the...

    > Your "friend" definition doesn't match the implementation, you have an extra "const" in the definition. My compiler actually had one other message that helped find the issue:

    Thanks for spotting...
  8. Replies
    15
    Views
    333

    Also, as I've enabled all warnings, I'm getting...

    Also, as I've enabled all warnings, I'm getting ones that I've never seen before...
    Why am I getting these? (Specifically the ones saying I need to initialise them using member initialisation lists...
  9. Replies
    15
    Views
    333

    #include class String {...

    #include <iostream>


    class String
    {
    private: /* Variables */


    char* m_Text;
    size_t m_Size;
  10. Replies
    15
    Views
    333

    Hey! I've been playing around with my String...

    Hey!

    I've been playing around with my String class (that I've been wanting to code, for a while now) and my recent interest in optimisation has been a driving force to test the randomest of...
  11. Replies
    15
    Views
    333

    Help with Strings

    Hey, just wanted to know which one of the following codes will be more optimized for return values. I'm just playing around with writing my own String class and experimenting for optimisation.


    ...
  12. Replies
    10
    Views
    55,287

    Sticky: Code Bullet: YouTube...

    Code Bullet: YouTube

    Simplilearn: YouTube

    Started research on Neural Networks and learning the basics in the last few days. Found these two channels interesting with good quality/explanations...
  13. Replies
    2
    Views
    122

    > why code doesn't print the entered letter ? ...

    > why code doesn't print the entered letter ?

    Because you aren't taking the input correctly. I don't know much about C and how to use printf but I'm pretty sure what you're doing is wrong.

    I...
  14. Replies
    13
    Views
    220

    You could use #pragma once for your...

    You could use


    #pragma once

    for your header file containing your typedefs, function declarations and definitions, etc and then include in multiple files without any problems I believe.
  15. Replies
    2
    Views
    143

    > for (i=0; i = days; i++) Your test condition...

    > for (i=0; i = days; i++)

    Your test condition is an assignment and not a test condition as pointed out by @rstanley already.

    Perhaps what you want is this



    for (i = 0; i < days; i++)
    {
  16. Replies
    23
    Views
    390

    #include struct Point { int...

    #include <iostream>


    struct Point
    {
    int x;
    int y;


    Point () : x(0) , y(0) { }
  17. Replies
    23
    Views
    390

    Thanks for referring me the docs, I've downloaded...

    Thanks for referring me the docs, I've downloaded the PDF and will make sure to read through carefully. For now though, I will not be reading through any solutions as that way I don't get to strain...
  18. Replies
    23
    Views
    390

    > NOW it is clear all ponts that can form a...

    > NOW it is clear all ponts that can form a rectangle (3 or 4 - not 2, which will give us infinite rectangles [with different areas and alignment]) must be AT the vertices. Is that correct and...
  19. Replies
    23
    Views
    390

    I found a similar question but this one caters to...

    I found a similar question but this one caters to only those rectangles whose edges/sides are parallel to axes. This is fairly easier question in which I didn't have to find slopes and do all the...
  20. Replies
    23
    Views
    390

    The question says to find the maximum possible...

    The question says to find the maximum possible number of rectangles. But it would be interesting to add code for displaying the points that form each rectangle.
  21. Replies
    23
    Views
    390

    Hey! Flp's interpretation is wrong. Let's...

    Hey!

    Flp's interpretation is wrong.

    Let's say there are four points with their coordinates entered (A, B, C, D be the points). Based on the rectangle posted by flp, AB forms one side of the...
  22. Replies
    23
    Views
    390

    for (Ctr1 = 0; Ctr1 < TotalPossibleLines; Ctr1++)...

    for (Ctr1 = 0; Ctr1 < TotalPossibleLines; Ctr1++)
    {
    for (Ctr2 = Ctr1 + 1; Ctr2 < TotalPossibleLines; Ctr2++)
    {
    if (SlopeOfLine[Ctr1] == SlopeOfLine[Ctr2])
    {
    ...
  23. Replies
    23
    Views
    390

    Example 1: Points: 6 Coordinates: (0,0) ,...

    Example 1:

    Points: 6

    Coordinates: (0,0) , (0,1) , (1,0) , (1,1) , (2,0) , (2,1)

    Total Possible Rectangles: 3 (Two smaller ones and one larger one)

    1) (0,0) , (0,1) , (1,1) , (1,0) ...
  24. Replies
    23
    Views
    390

    You're just being stupid. I'm not gonna bother...

    You're just being stupid. I'm not gonna bother replying to the crap you post.
  25. Replies
    23
    Views
    390

    My eyes bleed reading this. > BE SPECIFIC! ...

    My eyes bleed reading this.

    > BE SPECIFIC!

    I'm not the one who's supposed to be specific. That is literally what the question is. Any (non-idiotic, I may add) person will understand the...
Results 1 to 25 of 83
Page 1 of 4 1 2 3 4