Like Tree7Likes
  • 3 Post By Elysia
  • 2 Post By rags_to_riches
  • 1 Post By Matticus
  • 1 Post By Elysia

Error entering a function

This is a discussion on Error entering a function within the C++ Programming forums, part of the General Programming Boards category; Hi I have no error compiling, but running my project it stops before entering a function and debugging I have ...

  1. #1
    Registered User
    Join Date
    Jun 2013
    Posts
    33

    Error entering a function

    Hi I have no error compiling, but running my project it stops before entering a function and debugging I have an error about Segmentation fault. The function:

    Code:
    Mat logGabor(matriz filter,Mat filter,double r_o,double theta_o,double sigma_theta, matriz radius,matriz theta,int cols,int rows,double sigma_r,int *padSize){
    
    Mat rpad;
    int k=*padSize;
    
    printf("Welcome to the function"); //Here the error
    ...
    More info: I created the matriz as : typedef double** matriz;
    and a createmat function that give back a double** and in this function I allocate space for matriz and works. In the main:

    Code:
    Mat chr-Rpad[4][5]; //chrOrient=4;chrScales=5
    for(int i_or=1;i_or<chrOrient;i_or++){
      for(int i_sc=1;i_sc<chrScales;i_sc++){
          //some math calculation
         chrRpad[i_or-1][i_sc-1]=abs(logGabor(filter,imftt2,r_o,theta_o,sigma_theta,radius,theta,cols,rows,sigma_r,padSize));

  2. #2
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,668
    You know what? Maybe you should go back to C, since it is clear you aren't listening to any of the C++ people here.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    a_capitalist_story
    Join Date
    Dec 2007
    Posts
    2,651
    Or those who tell him to stop cross-posting.
    Elysia and Salem like this.

  4. #4
    Registered User
    Join Date
    Jun 2011
    Posts
    2,435
    Cross-posted on another forum here too!
    Salem likes this.

  5. #5
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,668
    Elvio Esposito: You know what? Here's the deal.
    Choose C or C++. It seems you can't make up your mind. They are not the same language.
    Secondly, stop cross posting. It annoys people.
    Thirdly, start listening to what people say.
    If you do not fulfil these requirements above, then it is unlikely anyone will want to help you.
    You are making this very hard on yourself.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  6. #6
    Registered User
    Join Date
    Jun 2013
    Posts
    33
    Whe you said to pass to C I wrote to another website. I said I just studied C language but I need for my project to use the some parts of C++ because for image processing, it s impossible just use C. I just wanted know if I it work using the Mat[][] to return the mat object from the function.When I create the matriz I do it with new double* [] as someone told me in another question. And using vectors of vectors it caused me the glibc error, as my teacher said.But well as you say I don t post more if I am a problem. Best whishes
    Last edited by Elvio Esposito; 07-02-2013 at 07:46 AM.

  7. #7
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,668
    Quote Originally Posted by Elvio Esposito View Post
    And using vectors of vectors it caused me the glibc error, as my teacher said.
    I don't see you having asked for help solving this!

    But well as you say I don t post more if I am a problem. Best whishes
    You are free to post wherever you want, but these guidelines are pretty universal. Wherever you go, remember them, and follow them.
    Elvio Esposito likes this.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Error "in function 'main' syntax error before 'int' Help Please
    By blackhat11907 in forum C Programming
    Replies: 5
    Last Post: 08-20-2011, 07:05 PM
  2. Replies: 8
    Last Post: 07-08-2011, 01:16 PM
  3. Entering a user equation to a source function ?
    By dcuneo in forum C++ Programming
    Replies: 5
    Last Post: 03-01-2008, 04:38 AM
  4. Replies: 7
    Last Post: 05-25-2006, 12:51 PM
  5. function to prompt user to continue entering data or not
    By Unregistered in forum C++ Programming
    Replies: 2
    Last Post: 05-05-2002, 06:38 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21