Recent content by Epic Sandwich
-
E
Searching for a string in a file (C)
It is a bit inefficient isn't it, I did try some other solutions and to be honest this was somewhat of a last resort, I think I would have tried to improve it's efficiency if I actually got it working. I have a feeling that it is something to do with the terminating 0 (or maybe in this case, the...- Epic Sandwich
- Post #4
- Forum: Programming and Computer Science
-
E
Searching for a string in a file (C)
Hi, I've got a program which recalls strings randomly from a file. The file contains the strings, with each one taking up 200 bytes and if it's not long enough, I have spaces inserted after to make up the length. So they are all end to end, and there are no line breaks. The program works...- Epic Sandwich
- Thread
- File String
- Replies: 19
- Forum: Programming and Computer Science
-
E
Looking for a Web 2.0 tutorial for beginners
Correct me if I'm wrong, but I believe Web 2.0 is just a name given to newer, more modern styled websites. In a way, Web 2.0 is like the rebirth of the internet, but more interactive. Anyway, for interactivity, Flash, PHP, javascript? (It's been a while, I'm not sure if people still use it...- Epic Sandwich
- Post #2
- Forum: Programming and Computer Science
-
E
Xcode, Duplicate symbol error during compilation? (C)
Wow, awesome last few posts here. I've just learned a ton, thanks everyone :biggrin:- Epic Sandwich
- Post #13
- Forum: Programming and Computer Science
-
E
Xcode, Duplicate symbol error during compilation? (C)
Ok, I'll keep that in mind. Briefly, could you sum up what I should use .h files for and what I should use .c files for? I'm a bit confused at the moment.- Epic Sandwich
- Post #9
- Forum: Programming and Computer Science
-
E
Xcode, Duplicate symbol error during compilation? (C)
Yep, you got it. I thought that you had to include the .c file to let the compiler know about the contents (in the case, the functions it contains), so this isn't the case? All you have to do is have it in the source folder?- Epic Sandwich
- Post #7
- Forum: Programming and Computer Science
-
E
Xcode, Duplicate symbol error during compilation? (C)
Just tried changing the name of NewEntry numerous times, but it had no effect. The exact same error came up. Also, I tried making a new project and copying all the code over, just to see if XCode had done something messy when I was experimenting with headers. But the same error still came up...- Epic Sandwich
- Post #4
- Forum: Programming and Computer Science
-
E
Xcode, Duplicate symbol error during compilation? (C)
I'm following a tutorial off of the internet - http://masters-of-the-void.com/book10.htm" one to be exact - and whenever I try and compile I get this error: [PLAIN]http://dl.dropbox.com/u/1426380/Screen%20shot%202010-08-01%20at%2015.26.11.png I've tried going over my code again and again...- Epic Sandwich
- Thread
- Error Symbol
- Replies: 13
- Forum: Programming and Computer Science
-
E
How Does a Pointer Behave Like an Array in C Programming?
Ok, thanks a lot to both of you, I've learned a lot today! I shall be looking into alloc, realloc and free very soon. Thanks again :D- Epic Sandwich
- Post #12
- Forum: Programming and Computer Science
-
E
How Does a Pointer Behave Like an Array in C Programming?
Ok, so I should only use const char * stringName = "Text here!" to store a string that I'm going to refer to later, and not change. Correct? Hopefully my final query, if I defined a string using char newString[10] = "Text here";, how would I go about changing the contents of that string? Is...- Epic Sandwich
- Post #9
- Forum: Programming and Computer Science
-
E
How Does a Pointer Behave Like an Array in C Programming?
Ah, that's just answered a question I've wanted to know for years! I always wondered why 32 bit processors were limited to a certain amount of ram. I'm also learning about strings at the moment, and instead of cluttering up the forum with another thread, I thought I'd carry it on here (as...- Epic Sandwich
- Post #7
- Forum: Programming and Computer Science
-
E
How Does a Pointer Behave Like an Array in C Programming?
Yeh, that makes sense, I'm using a 64bit mac. Just out if interest, why are pointers larger on 64 bit?- Epic Sandwich
- Post #5
- Forum: Programming and Computer Science
-
E
How Does a Pointer Behave Like an Array in C Programming?
Thanks a lot, that answer really helped me out. One more question came from your post though. So to be clear, when you declare an array with "int myArray[6]", for example, the size of myArray is the entire array, so chances are 24 bytes? However, if I defined it with malloc, the size of...- Epic Sandwich
- Post #3
- Forum: Programming and Computer Science
-
E
How Does a Pointer Behave Like an Array in C Programming?
So I'm learning C, and I think I'm doing pretty well so far. Anyway, I'm up to Arrays, and some code that was posted in the tutorial is this: #include <stdlib.h> int main() { int* myArray = malloc( sizeof(int) * 20 ); // could write int myArray[20]; instead. myArray[5] =...- Epic Sandwich
- Thread
- Arrays Pointers
- Replies: 16
- Forum: Programming and Computer Science
-
E
Job opportunities with a Physics Masters
I'm thinking about what course I'm going to do at university, and Physics has always been interesting to me. Anyway, I'm wondering what sort of jobs you can get if you come out of university with a masters in Physics? I'm thinking of either doing straight up physics or theoretical physics at...- Epic Sandwich
- Post #5
- Forum: STEM Career Guidance