Search:

Type: Posts; User: Zeus_

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    13
    Views
    148

    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.
  2. Replies
    2
    Views
    86

    > 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++)
    {
  3. Replies
    22
    Views
    260

    #include struct Point { int...

    #include <iostream>


    struct Point
    {
    int x;
    int y;


    Point () : x(0) , y(0) { }
  4. Replies
    22
    Views
    260

    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...
  5. Replies
    22
    Views
    260

    > 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...
  6. Replies
    22
    Views
    260

    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...
  7. Replies
    22
    Views
    260

    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.
  8. Replies
    22
    Views
    260

    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...
  9. Replies
    22
    Views
    260

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

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

    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) ...
  11. Replies
    22
    Views
    260

    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.
  12. Replies
    22
    Views
    260

    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...
  13. Replies
    22
    Views
    260

    Hey Salem! Again, I implemented this because this...

    Hey Salem! Again, I implemented this because this was the first idea I got after looking at the question. The constraint mentioned in the question was 4 < No. of points < 100. I stuck with arrays as...
  14. Replies
    22
    Views
    260

    Buddy, read the question again. In case it's not...

    Buddy, read the question again. In case it's not very clear, a rectangle is a shape with a pair of sides parallel to each other and another pair of sides that are also parallel but perpendicular to...
  15. Replies
    22
    Views
    260

    Sorry for the code elongation. Every time I...

    Sorry for the code elongation. Every time I copy-paste code from C::B, each newline character results in two newline characters on here. So, the program looks bigger than it actually is.
  16. Replies
    22
    Views
    260

    Maximum Possible Rectangles

    Hey, I've been practicing for another competitive programming event and there's this question which I'm facing difficulty solving.

    So, the question is to count the number of all possible...
  17. Replies
    7
    Views
    201

    Very true. I was reading the Stroustrup FAQ and a...

    Very true. I was reading the Stroustrup FAQ and a PDF that I came across on the internet while doing my research on the evolution of C and C++. There's so many ways I've been invoking undefined...
  18. Replies
    4
    Views
    317

    All the books I've downloaded were done without...

    All the books I've downloaded were done without changing/modifying the name so a quick Google search should land you at the right book. Out of the many books and websites saved, I've read almost 50%...
  19. Replies
    4
    Views
    317

    15855 15856

    15855
    15856
  20. Replies
    4
    Views
    317

    15849

    15849
  21. Replies
    4
    Views
    317

    @Mod, I think this message got posted like three...

    @Mod, I think this message got posted like three or more times, I don't know how. If it's possible, please delete the other two. Thanks! :)
  22. Replies
    4
    Views
    317

    Game Engine Development

    It's been nearly 1.5 years since I wrote my first line of code in C++. I remember how much I disliked programming in my first few days because I had never had the exposure and I thought that learning...
  23. Hey Thomas! Sometimes the simplest of mistakes...

    Hey Thomas! Sometimes the simplest of mistakes happen from the best of us.....

    Often, in companies and institutions, the mightiest of bugs may occur due to just a single line of code.
    Take for...
  24. Replies
    0
    Views
    75

    Permutations of all additions

    Assignment:

    Write a program to display all possible permutations of additions that lead to the Input number so long as they contain the digit "1"

    Example:

    Input: 5

    Output:
  25. Replies
    7
    Views
    201

    I had this question come in a test a few months...

    I had this question come in a test a few months back. (Just so I don't seem like a complete idiot, here's the question for beginners in Pointers ;)) (Don't use a compiler though)



    int Ar[] = {...
Results 1 to 25 of 69
Page 1 of 3 1 2 3