Wow, didn't even notice that. I was checking the description of sem_init() in the Open Group Base Specification document and it says nothing about having to link it with pthreads on compilation.
...
Type: Posts; User: jacobh
Wow, didn't even notice that. I was checking the description of sem_init() in the Open Group Base Specification document and it says nothing about having to link it with pthreads on compilation.
...
Can't seem to figure out this error. I have the semaphore.h file included, but for some reason I keep getting compiler errors stating it can't identify a reference to functions sem_init(),...
Shouldn't this be moved to general discussion?
I know this question is already answered, but I agree with laserlight, this is NOT a dumb question and there are two reasons why:
a) No question is a dumb question.
b) This questions touches on...
You aren't stupid, people get tripped on that all the time.
Is there a possibility that this thread can be merged with the getChar thread? If not, is it alright if we continue talking about your issues in this thread CProgramming11? I'm getting confused...
I'm not sure what you mean by returning 0, but I assume you mean that you aren't seeing what you typed as output to the terminal.
In this case, you may want to look at what you are doing to your...
Well, what you said didn't really help me out at all, but when you mentioned that my pointer fell off the end of the array, it reminded me that I forgot to add room for a NULL character in my malloc...
Hey everyone,
I was messing around with pointers trying to get a better understanding of them, and I came across something that I haven't been able to solve in regards to freeing a double pointer...
Be nice to see some code.
As for arrays with a power of 2, it depends on what you mean by "manipulated easily". From an algorithmic perspective, they can be more easily dealt with in merge sort,...
Had to read your post a couple times in order to have it sink in grumpy.
It's a very interesting conundrum to say the least, that languages who are so adamant about eliminating pointers, have to...
Answer available at this link: Bubble Sort
Look at the middle part of the code where it begins with... while(!sorted) {
Sorts in ascending order.
I never said I was comparing anything, I'm just confused on why a null reference is consider unacceptable in C++, but acceptable in C# and Java.
You can also overload operators in C#: C# Operator...
I'm just wondering why references can't be assigned a null value in C++, where in modern OOP languages, you can assign a null reference to an object variable.
I mean it seems strange to make it...
I know that, I was just wondering how it would be done in those languages since it's allowed in C# and Java to have a null reference, but in C++ it isn't.
I was reading up on the differences between pointers and references because even though they operate similarly, i.e. through indirection, they have very different mechanics and semantics.
I...
I was wondering if anyone could tell me how to include linux source headers into a C program. Right now the header files for my linux version are stored in /usr/src/linux-headers-2.6.28-15/include,...