Re: func return 2 values Programming Software Development by titosd grumpier I didn't ask you to write the func that i want, but I want another example but with …parameters to understand the way. minas I have write the func with structer [icode] #include<stdio.h> struct mytype… Re: func return 2 values Programming Software Development by titosd yes I know that it works, but in the question we should write the func [U]just[/U] with pointers !!! Re: helping in a func calling Programming Software Development by titosd … called the getword() func in the checkValid() Func. so, when I called the CheckValid Func I called too the getword() func. I didn't… in the second parameter. but try to call the replace() func by this code: [code] replace(word,"favorcy","…;favor"); [/code] you will see that the func replaced the words helping in a func calling Programming Software Development by titosd … all the code is correct, but when i call the func that replace the words I have a problem in the… second parameter in the func plz if anyone can help me. this is the code… How to call javascript func using href by passing dynamic value Programming Web Development by yuvi2288 … I used the following code to call a javascript function func() with dynamic parameter param in jsp. out.println("<…;a href='#' onclick='javascript:func('"+ param +"')'>"+ param +"</a>… logmsg func Programming Software Development by Mr_PoP … last line i mean the last time i called the func!! how can i make it write every thing every time… Re: helping in a func calling Programming Software Development by Ancient Dragon …;I have a problem in the second parameter in the func What is the problem with it? OpenGL - displaying issue (reshape func) Programming Game Development by Yle ….0f,1.0f); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); }[/code] and the drawing func("bobby's" variables x and y are holding… Select func in socket programming Programming Software Development by ankur_ what is the time that select func in socket programming waits before continuing. Like till how much … can i put the time in func. or class so i can call it when i want Programming Software Development by Mr_PoP …;,timeinfo); [/CODE] is there away to put it into a func or class or is there a better way to get… How to use C++ func in mysql query Programming Databases by Deepali_Jain I have a function C++ file, created in VS 2005. But I am not sure how to register that function in mysql, so that it get stored somewhere in mysql database and when the query runs, it should retrieve the func definition from the database itself.. Please guide me with the procedure. Thanks is "dataset.table.rows.find()" func. supports sql date type primary key? Programming Software Development by Oneryavuz … my row/s i need but when i tried this func. on date type primary key it cannot find i tried… static func.'s! Programming Software Development by shahera.arafat … >>what is the use of (static) word in func.'s ? in this code what does it mean ??and if… Re: what does func(int x, int y, int z=1) mean? Programming Software Development by siddhant3s … the default argument should be placed from right. i.e. func(int x, int z=1, int y) is not allowed… Re: Question about my FUNC Programming Software Development by markfisher … me much faster? (That was the whole purpose of that func to make me understand multi byte zeroing) Thanks Mark Re: coding the summation func in calculator (EventHandling) Programming Software Development by shahera.arafat the pro. was that I could'nt add 2 numbers >>the result is always wrong >>and that's because the seconde number value is wrong ! so the solution was by writing a switch statement and other func.'s :P func(type *var) == func(type var&) ? Programming Software Development by VBNick I have seen functions defined these two ways: function(type *variablename) function(type variablename&) I commonly use the first one to pass on pointers to my structs, but is the second one the same as the first? Re: func(type *var) == func(type var&) ? Programming Software Development by Rashakil Fol It's the same thing -- once the code has been compiled -- and used for the same purpose. It's better to use the second way, passing "by reference," because the first desensitizes you toward pointers. (Your spidey sense should tingle when you see a pointer -- it means danger lurks.) It's very common, especially, for functions to take … Re: func(type *var) == func(type var&) ? Programming Software Development by VBNick I'm sorrrry..I don't understand, maybe because I put the & in the wrong place above. this here is the function in question, copied from the project. [code="cplusplus"] f32 dot_xyz( const sVec4& other) const { return x*other.x + y*other.y + z*other.z; } //I would usually do it like this: f32 dot_xyz(sVec4 *other) {… Re: func(type *var) == func(type var&) ? Programming Software Development by Rashakil Fol The danger lurks because the pointer could be null, or the pointer could be pointing at something that no longer exists. It's easy for programmers to make mistakes like that. It's slightly harder to do this with references. Also, there ends up being less syntax involved, and the person using the function doesn't have to wonder whether the … Re: func(type *var) == func(type var&) ? Programming Software Development by VBNick Okay, Thanks! I think I understand now. I should use (type &var) for a single variable, and only use (type *var) if I have to send an array. The "const" thing I supposed would only be applicable if I was making a class or software for someone else, so I guess I'll get to using that some other time. Thanks again. segm fault again, please help Programming Software Development by nhrnjic6 func should take array and find a index of a target … Func like getlastkey() or something like that? Programming Software Development by Anu Hi again, since my last thread I proceeded a bit and in the meanwhile took a closer look on Mode13h. I started programming some simple games like Snake etc, but I'm stuck on a specific function I couldn't discover yet: I need a getch(); which aint actually waiting for the input itself or in other words, a function to simply return the value … Re: Func like getlastkey() or something like that? Programming Software Development by Anu Unfortunately I aint able to edit this post since I posted when I was on another comp, so I'll ask again a bit more precisely: I need a function that returns the int value of the last pressed key, no matter when it was pressed. And to add another question: How can I make use of keys like the arrows keys or the f-keys under Dos, since when I … Re: Func like getlastkey() or something like that? Programming Software Development by Narue >I need a getch(); which aint actually waiting for the input itself or in other >words, a function to simply return the value of the last pressed key. Try using a combination of kbhit and getch. I'll assume that you have those on your implementation because you mentioned them. >How can I make use of keys like the arrows keys or the f… Re: Func like getlastkey() or something like that? Programming Software Development by Anu Arite, should bring me on... I didn't use kbhit yet though, since as far as I had been proceeding getch worked quite well. Thank you. And concerning searching... So far I've been searching -and finding- for like everything I needed to know here, brought me ahead amazingly. Just added that question there 'cause I had to do a new post in here … Re: Func like getlastkey() or something like that? Programming Software Development by Anu Arg.. hit the wrong button -.- No way to delete my own posts in here? Re: Func like getlastkey() or something like that? Programming Software Development by Narue kbhit typically takes no arguments and returns either 0 if there are no keyboard events in the queue and non-zero if there are. You might use it like this: [code] #include <stdio.h> #include <conio.h> int main ( void ) { int last_key; while ( !kbhit() ) ; /* Do nothing */ last_key = getch(); cprintf ( "… Re: Func like getlastkey() or something like that? Programming Software Development by Anu Ah..I see, thought kinda wrong then, hehe. I think I know how to do it now, thanks. Re: Func like getlastkey() or something like that? Programming Software Development by vegaseat This might help you with the arrow keys: [code]// trap the arrow keys // note: Pelles C uses _getch() rather than getch() #include <stdio.h> #include <conio.h> static int get_code ( void ); // System dependent key codes enum { KEY_ESC = 27, ARROW_UP = 256 + 72, ARROW_DOWN = 256 + 80, ARROW_LEFT = …