Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!usc!zaphod.mps.ohio-state.edu!mips!cs.uoregon.edu!geriatrix.cs.uoregon.edu!akm From: akm@geriatrix.cs.uoregon.edu (Anant Kartik Mithal) Newsgroups: comp.os.msdos.apps Subject: Windows and pointers as parameters Summary: what do we need to be concerned about? Keywords: parameters, pointers Message-ID: <1991Mar22.185504.3266@cs.uoregon.edu> Date: 22 Mar 91 18:55:04 GMT References: <39621@netnews.upenn.edu> Sender: usenet@cs.uoregon.edu (Netnews Owner) Organization: Department of Computer Science, University of Oregon Lines: 33 Hi, a question about pointers as function parameters. Given that windows can move code/data around in memory (I believe that is correct), is it okay (or is it not okay) to pass pointers as the arguments to a function? What I want to do is to have a function set the values of a couple of variables (boring sort of stuff), but I am not sure that I can pass the variables through pointers to the setting function. eg: void CallerFunction () { int x, y; SetValue(&x, &y) . . } void SetValue(x, y) int *x, *y; { *x = 10; *y = 20; } thanks in advance, kartik -- Anant Kartik Mithal akm@cs.uoregon.edu Research Assistant, (503)346-4408 (msgs) Department of Computer Science, (503)346-3989 (direct) University of Oregon, Eugene, OR 97403-1202