strange so strange

hi all
i debuging my application
i checked that all files updated all dll's libraries updated
i put several breakpoints one of them is with ?
question mark
this is so strange i tried evrything rebuild all etc....
i saw that my function is like this
void foo( int x, int y
int a,double b
.. ..
)

at each row two variables
suddenly i changed it to

void foo( int x, int y,int a,double b
.. ..
)
4 variables at each row at the breakpoint ok
it is very very strange
before i tried to comment all the code and part of the inputs only when i put 4 in row it worked !!!!
does microsoft has bug
i have many inputs to the function somthing like 40

Comments

  • : i have many inputs to the function somthing like 40
    :

    @!$$@! Create a structure with all those variables and pass a pointer to the structure. To my knowledge there is no limit to the number of parameters that can be passed, but for your own sanity you should limit it to just a 3 or 4. Any more you should pass a structure.

    As for the debugging problem, I have never created a function with so many parameters so I don't know.
  • : : i have many inputs to the function somthing like 40
    : :
    :
    @!$$@! Create a structure with all those variables and pass a pointer to the structure. To my knowledge there is no limit to the number of parameters that can be passed, but for your own sanity you should limit it to just a 3 or 4. Any more you should pass a structure.
    :
    : As for the debugging problem, I have never created a function with so many parameters so I don't know.
    :
    i must use 40 since i create interface for labview program
    i dont know how to pass structure from labview just variables variables
    http://www.ni.com/labview/
    even that there is complex interfaces i dont want to deal with them especially that i have complex variables of intel type eg:

    --------
    typedef struct {
    Ipp64f re;
    Ipp64f im;
    } Ipp64fc;

    typedef double Ipp64f;
  • : : : i have many inputs to the function somthing like 40
    : : :
    : :
    @!$$@! Create a structure with all those variables and pass a pointer to the structure. To my knowledge there is no limit to the number of parameters that can be passed, but for your own sanity you should limit it to just a 3 or 4. Any more you should pass a structure.
    : :
    : : As for the debugging problem, I have never created a function with so many parameters so I don't know.
    : :
    : i must use 40 since i create interface for labview program
    : i dont know how to pass structure from labview just variables variables
    : http://www.ni.com/labview/
    : even that there is complex interfaces i dont want to deal with them especially that i have complex variables of intel type eg:
    :
    : --------
    : typedef struct {
    : Ipp64f re;
    : Ipp64f im;
    : } Ipp64fc;
    :
    : typedef double Ipp64f;
    :
    40...and I thought the winapi was scary... are you sure you need only one function? Try either using a structure like stober said or break up your function into smaller parts that are called by each other or in succession, or you have sorta a simple sentry function that calls then in order, or so on and so on.

    You might have more functions to deal with, but a call won't take up 4-5 lines :)
    {2}rIng
  • : i must use 40 since i create interface for labview program
    : i dont know how to pass structure from labview just variables variables
    : http://www.ni.com/labview/
    : even that there is complex interfaces i dont want to deal with them especially that i have complex variables of intel type eg:
    :
    : --------
    : typedef struct {
    : Ipp64f re;
    : Ipp64f im;
    : } Ipp64fc;
    :
    : typedef double Ipp64f;
    :


    If you are calling one of LabView's standard library functions then I think you should read it again. Its true you cannot pass a simple structure in exchange for all those parameters unless you can change the function in the library. I hope it is not YOU that is designing that function for LabView???? If it is, then you need to get with your boss and make a better function design.
  • : hi all
    : i debuging my application
    : i checked that all files updated all dll's libraries updated
    : i put several breakpoints one of them is with ?
    : question mark
    : this is so strange i tried evrything rebuild all etc....
    : i saw that my function is like this
    : void foo( int x, int y
    : int a,double b
    : .. ..
    : )
    :
    : at each row two variables
    : suddenly i changed it to
    :
    : void foo( int x, int y,int a,double b
    : .. ..
    : )
    : 4 variables at each row at the breakpoint ok
    : it is very very strange
    : before i tried to comment all the code and part of the inputs only when i put 4 in row it worked !!!!
    : does microsoft has bug
    : i have many inputs to the function somthing like 40
    :
    [green]
    Can you pass an array by reference?
    [/green]

  • : : hi all
    : : i debuging my application
    : : i checked that all files updated all dll's libraries updated
    : : i put several breakpoints one of them is with ?
    : : question mark
    : : this is so strange i tried evrything rebuild all etc....
    : : i saw that my function is like this
    : : void foo( int x, int y
    : : int a,double b
    : : .. ..
    : : )
    : :
    : : at each row two variables
    : : suddenly i changed it to
    : :
    : : void foo( int x, int y,int a,double b
    : : .. ..
    : : )
    : : 4 variables at each row at the breakpoint ok
    : : it is very very strange
    : : before i tried to comment all the code and part of the inputs only when i put 4 in row it worked !!!!
    : : does microsoft has bug
    : : i have many inputs to the function somthing like 40
    : :
    : [green]
    : Can you pass an array by reference?
    : [/green]
    :
    :
    1. i am the boss
    2. no one answered why is the breakpoint is with ? mark
    3. yes there is option to pass structures but i dont have time to read the format
    anyway thanks to all
  • : : : hi all
    : : : i debuging my application
    : : : i checked that all files updated all dll's libraries updated
    : : : i put several breakpoints one of them is with ?
    : : : question mark
    : : : this is so strange i tried evrything rebuild all etc....
    : : : i saw that my function is like this
    : : : void foo( int x, int y
    : : : int a,double b
    : : : .. ..
    : : : )
    : : :
    : : : at each row two variables
    : : : suddenly i changed it to
    : : :
    : : : void foo( int x, int y,int a,double b
    : : : .. ..
    : : : )
    : : : 4 variables at each row at the breakpoint ok
    : : : it is very very strange
    : : : before i tried to comment all the code and part of the inputs only when i put 4 in row it worked !!!!
    : : : does microsoft has bug
    : : : i have many inputs to the function somthing like 40
    : : :
    : : [green]
    : : Can you pass an array by reference?
    : : [/green]
    : :
    : :
    : 1. i am the boss
    : 2. no one answered why is the breakpoint is with ? mark
    : 3. yes there is option to pass structures but i dont have time to read the format
    : anyway thanks to all
    :

    breakpoint...do you mean the newline character '
    ' ?...even so, I don't think it'll harm your program, but if you need it the line to be broken, then well, idk :) I dont use VC++

    but about the 40 params/arguments, still, unless you are the only one who'll use the function and it doesn't bother you having to write out 40 values each time you call the thing, you should consider a different method of doing things. Not many programmers I ensure you are going to have much patience with such an api, just in case you plan to pass your code around...
    {2}rIng
  • [b][red]This message was edited by stober at 2006-7-31 3:45:24[/red][/b][hr]
    : 3. yes there is option to pass structures but i dont have time to read the format

    :


    by the time you fart around with all the problems of passing 40 parameters you could have found out how to fill out a structure and pass just one parameter (a pointer to the structure). And as Gregory said, you can forget about any plans you may have about selling your code to anyone else, programmers will NOT buy it or if they do they will either sue you, return it, or quickly dump it in the bit bucket with all the other nonsense programs.


  • : [b][red]This message was edited by stober at 2006-7-31 3:45:24[/red][/b][hr]
    : : 3. yes there is option to pass structures but i dont have time to read the format
    :
    : :
    :
    :
    : by the time you fart around with all the problems of passing 40 parameters you could have found out how to fill out a structure and pass just one parameter (a pointer to the structure). And as Gregory said, you can forget about any plans you may have about selling your code to anyone else, programmers will NOT buy it or if they do they will either sue you, return it, or quickly dump it in the bit bucket with all the other nonsense programs.
    :
    :
    :
    im so luccky i am the only c++ programmer in my company
    :)

  • : im so luccky i am the only c++ programmer in my company
    : :)
    :
    :

    I know what that's like, I had a job like that for about 10 years. Its really hard to get help on difficult problems.
  • : strange so strange
    When you find something strange in programming, this often says more about you then about what you find strange. Programming is a very logical art.

    : i put several breakpoints one of them is with ?
    : question mark
    If a question mark appears on a breakpoint, this means that the line the breakpoint is set to, is a non-executed or non-breakable line. For example a line of comment. Also, if a function declaration spans multiple lines and you set the breakpoint to the second line, this breakpoint will not be used.

    Changing your function from

    [code]
    : void foo( int x, int y
    : int a,double b[red],[/red]
    : .. ..
    : )
    [/code]

    to

    [code]
    : void foo( int x, int y,int a,double b[red],[/red]
    : .. ..
    : )
    [/code]

    cannot stop it from working, except when you did not put the comma's right.

    Good luck,
    bilderbikkel

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories