returning a void pointer to a chunk of a character array

Started by
16 comments, last by darcmagik 11 years, 7 months ago
You know, part of taking a programming test is to evaluate your skills. That sort of thing is pretty elementary C.

And yeah... that comes off as completely unprofessional.
Advertisement

As far as my post being vague its vague for a reason the truth is that I'm working on a programming test, in the test it states that I can look for my answers in other places, of course I'm required to state my sources of the information that I get.

I downvoted this because a) I don't think it's cool that you're using other people to write your code for your test, b) you mislead people on this (by not stating it upfront), and c) you have shown no effort (see rip-off's post and the "What have you tried?" link) (I get it, you're not to share code from the project, but that's when you write throw-away code that you can share; even without the code though, you could've explained what you've tried/what you thought a valid solution might be).
[size=2][ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]
Ok I have to admit this morning when I came on hoping for some nugget of knowledge to lead me on the right path and I saw a thread full of basically insults from everybody on here I was very angry. I get it my post was not perfect I'm sorry for that. I was not trying to mislead anybody or attempting to cheat on the test I was simply a stressed out programmer trying to figure out this damn problem. I get the fact that if I can't figure out this problem on my own than I'm probably not ready for the job that I applied for, but that doesn't mean that I dont want to figure it out. Yes I probably should have been more descriptive and explained what I have tried. What I have tried is to wrap my head around what it was that I'm trying to do in this project. Its been a while since I've dealt with pointers and was stumped on how to go forward with this problem.

So I'm going to end this thread by saying what I guess I've had to say all along I'm sorry. I have been coming to this website for years, and have learned a lot but the way some of you act on this thread I'm some low life because I don't know every answer.... Thanks for making my day so much better.

Darcmagik

Of all the things I've lost I miss my mind the most.


So I'm going to end this thread by saying what I guess I've had to say all along I'm sorry. I have been coming to this website for years, and have learned a lot but the way some of you act on this thread I'm some low life because I don't know every answer.... Thanks for making my day so much better.


I don't think it's because you don't know every answer. It's more that it appears that you're trying to use GDNet as a source for "cheating" on a programming test. It may not be literal cheating, but as has been said, this kind of thing (if we understand what you're trying to do correctly) is simple enough that if you can't do it without our help, you probably don't deserve to pass the test. Personally, I would consider anything that helps one pass a test - when one does not deserve to - to be cheating, and judging by posts here, I'm not alone. In essence, we are not attacking you - personal attacks are definitely unprofessional - but it does appear that some are attacking your intention and your presentation, which are perfectly fair game and the latter is even expected in a professional environment. I often take solutions I invent to my colleagues at work specifically to have them "attack" my solution and point out all of the flaws in it.

If you had come to us and had said something along the lines of, "I got this question in a programming test, and though I wasn't able to solve it myself, I'm interested in what the answer is. I'd also like to know how to do this so that next time I see a question like this, I can solve it," then you would have received a much better reception. Writing in more formal English than you used would also have helped, as we tend to assume that people who have bad spelling/grammar or excessive punctuation (as in your case) are either non-native speakers of English or native-speaker teenagers unaware that forums are not texting. The former is permissible, if not ideal, but the latter looks lazy and unprofessional. There are many who would argue that writing in the correct register is part of being "professional."
For the record, I'm not making any claims about you as a person or your work. I'm not saying you haven't put forward any effort (I'm saying you didn't show you have), I'm not saying you tried to mislead people (though it was misleading), and I'm not insulting you (though I am being critical). I can't make those claims. I'm just (and others have done this too) pointing out how you can be more effective and professional in the future.

Take this in stride and just use it as an opportunity to learn how to more effectively and professionally communicate in the future. Don't get offended (L. Spiro's analysis is indeed accurate; I don't think L. Spiro intended to offend you, and only intended to point out how/why your post is ineffective so that you can improve).
[size=2][ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]
Ok I can respect everybody's opinion on here and yes I will agree my post was very unclear and from the outside looking in it looks very deceiving and like I was attempting to cheat on the test. Please allow me to again apologize for my actions on here and my all around bad thread that I started. That being said I would like to try to meet in the middle on this issue and try to get everybody to see it from my point of view, when you post a thread on here and the first four responses given on here are about how unclear and bad your post is it can make you a bit irritated. I'm not saying that my post deserved tons of help and information but one maybe two posts asking for clarification is fine, more than that and it feels like some are repeating what everybody else was saying just so they could have put their opinion in on the matter.

That being said I see that I need to read up on my pointer skills as in all of the studying I have done I have actually never run into an example or a programming project / exercise that covered the idea of returning a void pointer to a section of an array. I guess the idea never even crossed my mind as something that was possible.

Darcmagik

Of all the things I've lost I miss my mind the most.

I think you are completely misunderstanding the "mission statement" of returning a pointer to a segment.


I'm simply stumped as far as how to select a section of a character array the size of the size provided and return a pointer to just that section without returning a pointer to the whole thing.
[/quote]

You can't. A pointer doesn't point to a range/segment, it points to a "point". It's like having only one number and wanting it to reference a range of numbers: impossible.
f@dzhttp://festini.device-zero.de
Yes true as I've been working on this I realize what I need to do is return a pointer to the beginning of the chunk being worked with.

Darcmagik

Of all the things I've lost I miss my mind the most.

This topic is closed to new replies.

Advertisement