Search:

Type: Posts; User: Suchy

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Thread: Points on circle

    by Suchy
    Replies
    2
    Views
    1,216

    Points on circle

    I loaded an image into a 2D array, where each index is a pixel. The image is just a white circle on black background.

    I am having trouble locating the upper-most, left-most, right-most and...
  2. Replies
    4
    Views
    1,589

    Strange compiler error

    When trying to compile a simple script with Gcc:


    #include <stdio.h>
    #include <math.h>

    int main()
    {
    double a = cos(360);
    printf ("cos: %d\n\n", a);
  3. Replies
    10
    Views
    6,532

    That part about "taking a note "in the book got...

    That part about "taking a note "in the book got me. So what should hash (associative array) contain?

    I don't get that part, could you explain it little mor or give me na example.

    Thanks for...
  4. Replies
    10
    Views
    6,532

    Thanks, now I finaly get something like this when...

    Thanks, now I finaly get something like this when printing out the labels array


    --------------------------------------------------------
    ---------------------------------------------------aaa--...
  5. Replies
    10
    Views
    6,532

    So any idea on how to fix this, also I hard coded...

    So any idea on how to fix this, also I hard coded that the label is a, I need to fix this since the idea is that every shape gets a new label (a,b,c,d...).

    Is it posible to add someting to char to...
  6. Replies
    10
    Views
    6,532

    Sequential Labeling Algorithm

    I am trying to implement the Sequential Labeling Algorithm, which looks at a binary image and assigns a label to each image.




    int rows = im -> getNRows();
    int cols = im -> getNCols(); ...
  7. Thread: What is a virus

    by Suchy
    Replies
    17
    Views
    4,862

    What is a virus

    Are there rules that decide if a given program is a virus?

    If I maka a simple program that creates a txt file somewhere in system directory (ex. WINDOWS\system32) and via a infinite loop writes...
  8. Thread: Function origin

    by Suchy
    Replies
    7
    Views
    1,322

    Thanks for the replys, I will stick with my...

    Thanks for the replys, I will stick with my original way.
    But thanks for the ideas.
  9. Replies
    50
    Views
    9,247

    yeah, they both contain same letters but since...

    yeah, they both contain same letters but since only 4 are read from the first string and 5 from next, these words are not anagrams
  10. Replies
    50
    Views
    9,247

    I did something simmilar way back, hope it helps:...

    I did something simmilar way back, hope it helps:





    #include <fstream>
    #include <iostream>
    #include <stdlib.h>
    #include <string>
  11. Thread: Function origin

    by Suchy
    Replies
    7
    Views
    1,322

    Because I have a function that prints contents of...

    Because I have a function that prints contents of an array, it is used multiple times.
    The first line is:

    cout << "Array " << what << " = ";
    what can be "created", "updated", "deleated" ......
  12. Thread: Function origin

    by Suchy
    Replies
    7
    Views
    1,322

    Function origin

    When I call a function X in multiple places (main, from within other functions) is it possible to know each time X was called what part of the code called it, or do I have to pass flags with each...
  13. Thread: Suming ints

    by Suchy
    Replies
    1
    Views
    1,180

    Suming ints

    I am having trouble converting chars into ints:


    char input[100];
    int in, count, i;
    while ((in = fgets(fp) != EOF){
    input[count] = in;
    ++count;
    }
  14. Thread: Fopen + av[]

    by Suchy
    Replies
    2
    Views
    1,077

    Fopen + av[]

    This is a simple problem, which I can't get right:




    int openme(file)
    {
    FILE *fp;
    fp = fopen(file, "a");
    }
  15. Thread: Mapping keys

    by Suchy
    Replies
    0
    Views
    882

    Mapping keys

    In Unix after I change the mode to non-canical how can I map different keys?
    ex. setting Crtl-Z to do something other then quiting the program.
  16. Thread: Returning Array

    by Suchy
    Replies
    4
    Views
    1,402

    When I do that I get the same error as before : ...

    When I do that I get the same error as before : "function returns address of local variable"
    rhe error is caused by the return line
  17. Thread: Returning Array

    by Suchy
    Replies
    4
    Views
    1,402

    Returning Array

    I am trouble returning a pointer to an array back to main:



    int *funct(int argc, char *argv[]);

    main


    int *a = funct (argc,argv);
  18. Thread: Infix - Postfix

    by Suchy
    Replies
    2
    Views
    1,256

    Infix - Postfix

    switch (input[i])
    {
    case '(':
    operator_stack.push(input[i]);
    break;


    case '+':
    case '-':
    ...
  19. Replies
    7
    Views
    1,301

    Yes, I noticed that. Couple of commands had...

    Yes, I noticed that. Couple of commands had simmilar names, thus typing one in called the wrong function.
    But since I only have few commands, I changed their names and everything is smooth.
  20. Replies
    3
    Views
    928

    what I want is the set value to what ever val[0]...

    what I want is the set value to what ever val[0] is, how can I do this?
  21. Replies
    3
    Views
    928

    incorect value of node

    I have a simple function that adds a node to a linked list:


    node *x = new node;
    cout << "enter value" << endl;
    cin >> x -> value;
    x -> next = head;
    head = x; ...
  22. Replies
    7
    Views
    1,301

    Cool that works, thanks. I have another idea,...

    Cool that works, thanks.
    I have another idea, let me test it and I will get back.

    PS.


    string x;
    cin >> x;
    if ( x.find_first_of("add", 0) == 0)
    cout << "found function 'add...
  23. Replies
    7
    Views
    1,301

    I am using if/else know to check the first token,...

    I am using if/else know to check the first token, but how can can I compare a string that looks like: add 15 without breaking it up.


    cin >> x;
    if (x == "add..... ??????)
  24. Replies
    7
    Views
    1,301

    Determining function based an input

    I have a menu, where the user enters a command followed by a argument, ex:
    add 5 // adds 5
    sub 7 // sub
    in x 8 // inserts x into the 8 th spot

    Right now I am tokenizing the string, looking at...
  25. Replies
    4
    Views
    1,237

    Even if I make it struct stat as in the man page...

    Even if I make it struct stat as in the man page I get the same error, also I use this prog for testing only so I do not care how the output looks like (maybe I should :) ).

    Any way how can I...
Results 1 to 25 of 76
Page 1 of 4 1 2 3 4