Search:

Type: Posts; User: DecoratorFawn82

Page 1 of 7 1 2 3 4

Search: Search took 0.01 seconds.

  1. "And yup, you are probably right: "or you are...

    "And yup, you are probably right: "or you are code blind.""
    I've already admitted that I don't understand the code. No need to push me down even further.

    And yes I will do a run test with...
  2. I might have misinterpreted something then I...

    I might have misinterpreted something then I guess.
    The reason I thouhght it was in the orientation method was because
    it gives the output to:



    int o1 = orientation(p1, q1, p2);
    ...
  3. Here is some real data that I've been testing to...

    Here is some real data that I've been testing to find the pattern.
    This is correct assumption: "I was thinking you wanted the last "yes" to be "no";"
    And yup, you are probably right: "or you are...
  4. So did you mean that I should remove the part...

    So did you mean that I should remove the part that checks for colinear lines?



    int orientation(Point p, Point q, Point r)
    {
    // See...
  5. Check if two lines intersect (not touch)?

    So I found this post about how to check if two lines intersect. How to check if two given line segments intersect? - GeeksforGeeks and it works. What I wanted to do is to modify it if possible so...
  6. Looking at your instructions, you don't need...

    Looking at your instructions, you don't need DisplayArray in the first place. You're supposed to print the second half of the dynamic array from the end each time and then copy the unprinted first...
  7. So like this then: void...

    So like this then:


    void DisplayArray(std::string msg, int arr[], const int size) {
    std::cout << msg << std::endl;
    for (int i = size - 1; i >= 0; i--) {
    std::cout << arr[i] <<...
  8. Reducing the size of a dynamically allocated array?

    Hi! So we are trying to learn about pointers and dynamic memory allocation, but the problem is that we get "garbage values" because when we try to allocate a smaller array that is half the size of...
  9. Refering to the second link inmy post. How...

    Refering to the second link inmy post.

    How would I use that formula in:



    bool isMine (int row, int col, char board[][MAXSIDE])
    {
    if (board[row][col] == '*')
    return (true);
  10. Minesweeper adjacent mines with one dimensional array?

    So I've searched around the internet for a way to check for adjacent mines. And a lot of algorithms for it do exist out there. The thing is
    that all of the solutions that I've encountered for the...
  11. Yeah, that will work :) Thank you!

    Yeah, that will work :) Thank you!
  12. Sure, this would break out of the loop. But...

    Sure, this would break out of the loop.
    But does it really check so that every value in the array is true?

    I mean it does, but if one value is true it sets hasWon = true and
    breaks out of the...
  13. Check all values in bool array so that they are true without using return, break?

    So I have found very many articles about how you can do this, but all of the solutions that I've found are using multiple return statements. And that is not allowed in this case. It is not allowed to...
  14. Thank you! That is a very clear answer. I...

    Thank you! That is a very clear answer. I understand why that is happening now.
  15. Question about duplicate in array algorithm (that seems to work sometimes, maybe not)

    Hi! I'm having a problem with this algorithm that is supposed to remove duplicates from the array. The problem is that when chaging the number after the modulus ( % ) sign, the console just stands...
  16. Okay, yeah xD. I get your point. No. I...

    Okay, yeah xD. I get your point.



    No. I thought of it as sum of two circles areas, but the variable sum should be named more specifically.
  17. Operator Overloading more than once?

    Hi! I thought if I have overloaded the + operator so that it calculates the area of n number circles that are added, is there a way to make it calculate the circumference also?

    Can I tell C++ and...
  18. Don't see how this helps put the entered numbers...

    Don't see how this helps put the entered numbers into the array though.
    I just get an output with 0's which the array is initialized to be.

    Input: 1.0 2.0 0
    Output: 0 0 0 0 0 0 0 0 0 0 0 0 0...
  19. User enter number sequence (terminated by 0)

    The following program is supposed to let the user enter a sequence of numbers until the user enters 0. Then the program will stop. After that I want to print the array with the numbers that the user...
  20. Read string length when string contains the null character

    Hi! I wonder how you can replace the null character to be able to read the length of the whole string. Because C only reads to the null character I was told so I have to replace it with something...
  21. Thanks. It helped :)

    Thanks. It helped :)
  22. Array can't be created (expression must have a constant value)

    Hi! I've try to make a small program that shows the error, but I still don't understand why this doesn't work.

    If I have the code:


    #include <stdio.h>


    int main() {
  23. I get what you mean laserlight but in my...

    I get what you mean laserlight but in my assignment it sais that I should create
    a buffer with a large size, but of course it doesn't print all text to the file if the
    user types more than 1000...
  24. Actually, I do want an array because this only...

    Actually, I do want an array because this only part of code to a more complicated program. That program let's the user choose how many users to create.

    And thanks for the replies and my code...
  25. So I decided to try to do what I at least think...

    So I decided to try to do what I at least think you meant, if I'm not totally mistaken.

    1. So I created a temporary buffer (I hope) and then checks for as long as the input
    from the user is not...
Results 1 to 25 of 174
Page 1 of 7 1 2 3 4