Discussion Forums  >  Introduce Yourself

Replies: 8    Views: 1241

TechtagonDigital
I hate code!
Profile
Posts: 61
Reg: Aug 16, 2012
Bronx
2,610
04/11/13 09:35 AM (12 years ago)

Help needed to write a simple Code

I been a buzztouch member for some time now and if i may say, must of us here do not know how to code. so i need an urgent help with this simple c++ code. Write three functions in C or C++: One that declares a large array statically, one that declares the same large array on the stack, and one that creates the same large array from the heap. Call each of the subprograms a large number of times (at least 100,000) and output the time required by each. Explain the results. Help please and thank you in advance.
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
04/11/13 10:54 AM (12 years ago)
 
TechtagonDigital
I hate code!
Profile
Posts: 61
Reg: Aug 16, 2012
Bronx
2,610
like
04/11/13 11:12 AM (12 years ago)
I have seen these online. it comes up with an error, when i run it in xcode.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
04/11/13 11:41 AM (12 years ago)
could be that iOS uses objective-c, not C++. What is it you're trying to achieve?
 
TechtagonDigital
I hate code!
Profile
Posts: 61
Reg: Aug 16, 2012
Bronx
2,610
like
04/11/13 11:45 AM (12 years ago)
basically to write the code that would generate the output as it is asked in the question.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
04/11/13 11:50 AM (12 years ago)
well, if this is just to answer a homework question that's written exactly like you have it, then someone else will probably have to answer it - I don't know C++ as well as objective-c, sorry. :(
 
TechtagonDigital
I hate code!
Profile
Posts: 61
Reg: Aug 16, 2012
Bronx
2,610
like
04/11/13 11:54 AM (12 years ago)
if you can answer the question in Objective -c, that would be great too. The chooses are to write it in c or c++. Thank you
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
04/11/13 11:56 AM (12 years ago)
objective-c is different than "c" or "c++". Think of c/c++ as the underlying framework over which objective-c is built. Hence, your question is dealing with things such as clock management that is probably beyond the scope of objective-c.
 
TechtagonDigital
I hate code!
Profile
Posts: 61
Reg: Aug 16, 2012
Bronx
2,610
like
04/11/13 11:58 AM (12 years ago)
i see.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.