Sponsored Content
Top Forums Programming Help understanding pointer assignment in c Post 302362782 by broli on Saturday 17th of October 2009 03:03:12 PM
Old 10-17-2009
hmmm, so, with a "asdasd", the compiler takes care of alocating the memory

with the integer example, i have to use malloc, or create a normal integer, and point the pointer to the real integer

thanks for the clarification
 

10 More Discussions You Might Find Interesting

1. Programming

pointer

void main() { int a={1,2,3,4,5,6,7,8,9,10}; int *p=a; int *q=&a; cout<<q-p+1<<endl; } The output is 10, how? if we give cout<<q it will print the address, value won't print.... if we give cout<<p it will print the address, value won't print.... p has the base addr; q... (1 Reply)
Discussion started by: sarwan
1 Replies

2. Programming

far pointer

what is far pointer in C (1 Reply)
Discussion started by: useless79
1 Replies

3. What is on Your Mind?

New Assignment

All Sys Administrators, With due respect I would like to know what should be BEST Things to do when LEAVING one job , and what Precaution MUST be taken while taking over new JOB?? Please Discuss in detail the STEP to be taken for both the TIME ?? (3 Replies)
Discussion started by: vakharia Mahesh
3 Replies

4. Programming

pass a pointer-to-pointer, or return a pointer?

If one wants to get a start address of a array or a string or a block of memory via a function, there are at least two methods to achieve it: (1) one is to pass a pointer-to-pointer parameter, like: int my_malloc(int size, char **pmem) { *pmem=(char *)malloc(size); if(*pmem==NULL)... (11 Replies)
Discussion started by: aaronwong
11 Replies

5. Homework & Coursework Questions

Assignment Help

1. List commands to create the directory hierarchy $HOME/a/b/c in vi to replace all occurences of TMP with tmp in lines 1 through 10 in vi to replace first occurence of CPU_file with DISK_file at line 15 2. Explain with a very simple example, usage of "ls -a" 3. What do the... (2 Replies)
Discussion started by: jessesaini
2 Replies

6. Shell Programming and Scripting

Help Assignment !! :D

Q-1 Write a shell script in Unix that lists files from your current working directory · By modification time when called with lm · By access time when called with la. By default, the script should show the listing of all the files in the current directory. Q-2 Write a... (1 Reply)
Discussion started by: Vishank Parikh
1 Replies

7. Homework & Coursework Questions

Help Assignment !! :D

Q-1 Write a shell script in Unix that lists files from your current working directory · By modification time when called with lm · By access time when called with la. By default, the script should show the listing of all the files in the current directory. Q-2 Write a shell script which... (1 Reply)
Discussion started by: Vishank Parikh
1 Replies

8. Programming

Understanding C++ template partial specialization with pointer datatype arguments

When I compile the below code, I am getting error as template<typename T> T AddFun(T i, T j) { return i + j; } template<> T* AddFun<T*>(T* i, T* j) { return new T(*i + *j); } int main() { int n = AddFun<int>(10, 20); int i = 10, j = 20; int* p = AddFun<int*>(&i,... (1 Reply)
Discussion started by: royalibrahim
1 Replies

9. Homework & Coursework Questions

Understanding Getopts in an otherwise easy assignment

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: In the command line I will be given files or words which will be USER ID's or a file of USER ID's. I am to let... (4 Replies)
Discussion started by: ByronicX
4 Replies

10. UNIX for Dummies Questions & Answers

Need a little help with assignment

Hello all im currently working on this assignment and a little stump on how to check for an argument heres the instructions: Step 4: Modify your script so that if there is an argument called TestError you display the following error message with your usage statement. TestError found Example:... (1 Reply)
Discussion started by: bsn3971
1 Replies
wxChoice(3erl)						     Erlang Module Definition						    wxChoice(3erl)

NAME
wxChoice - See external documentation: wxChoice. DESCRIPTION
See external documentation: wxChoice . This class is derived (and can use functions) from: wxControlWithItems wxControl wxWindow wxEvtHandler DATA TYPES
wxChoice() : An object reference, The representation is internal and can be changed without notice. It can't be used for comparsion stored on disc or distributed for use on other nodes. EXPORTS
new() -> wxChoice() See external documentation . new(Parent::wxWindow() (see module wxWindow), Id::integer()) -> wxChoice() Equivalent to new(Parent, Id, []) . new(Parent::wxWindow() (see module wxWindow), Id::integer(), Options::[Option]) -> wxChoice() Types Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {choices, [[string()]]} | {style, inte- ger()} | {validator, wx() (see module wx)} See external documentation . create(This::wxChoice(), Parent::wxWindow() (see module wxWindow), Id::integer(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}, Choices::[[string()]]) -> bool() Equivalent to create(This, Parent, Id, Pos, Size, Choices, []) . create(This::wxChoice(), Parent::wxWindow() (see module wxWindow), Id::integer(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}, Choices::[[string()]], Options::[Option]) -> bool() Types Option = {style, integer()} | {validator, wx() (see module wx)} See external documentation . delete(This::wxChoice(), N::integer()) -> ok See external documentation . getColumns(This::wxChoice()) -> integer() See external documentation . setColumns(This::wxChoice()) -> ok Equivalent to setColumns(This, []) . setColumns(This::wxChoice(), Options::[Option]) -> ok Types Option = {n, integer()} See external documentation . destroy(This::wxChoice()) -> ok Destroys this object, do not use object again AUTHORS
<> wxErlang 0.98.9 wxChoice(3erl)
All times are GMT -4. The time now is 07:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy