Sorting will just cause more problems because of the restriction "for j >= i."
If I sort then I will have no way to tell if the ith value preceeds the jth value. Also the overhead involved in...
Type: Posts; User: purple
Sorting will just cause more problems because of the restriction "for j >= i."
If I sort then I will have no way to tell if the ith value preceeds the jth value. Also the overhead involved in...
No we don't have to show big O, but efficiency is key here. From friends of mine that are previous students of his, supposedly the teacher is a real jerk off and will actually halt processing early...
Faking it won't work. Here is a sample test file he gave us and you'll see what I mean by huge files.
I have a program that I need an efficient algorithm for and I was hoping someone could lend some insight. This program will eventually be written in Java for my Advanced Data Structures class, so...
Problem Solving Using C
Structured Programming Techniques
by Yuksel Uckan
This is a great book for beginners and I still use it to this day as a reference. I have the second edition, however...
Thanx Hammer, that site owns.
If anyone else has any good examples or sites please let me know.
I have a UNIX client/server program I need to write for school and I am pretty clueless when it comes to forming and sending/receiving packets.
Our teacher gave us a hint, but not much real...
No, your major problem is that you are trying to use scanf for both input and output.
scanf: inputs (scans in) values
printf: outputs (prints out) values and/or strings of text
Yes I totally agree Hammer, although this program was just for fun to see if I could code it.
Heh...you beat me to it
Sweet...thanks for pointing that out. I made some minor alterations and now it works flawlessly.
- I increased the size of c1 by one to allow room for one char and the NULL.
- I also increased...
The only difference that I know of between malloc and calloc is that calloc zeros out the array if it's of a numeric type, or NULLs out the array if it's of type char.
I don't see how that would...
Well my other thread regarding the best way to get user input got me thinking. Using fgets() and fgetc() are great if you have an array of a predetermined size and you don't want to overflow the...
I appreciate you clarifying and I apologize for calling you a smart ass, but your "See a pattern here?" comment came by as a little cocky.
Anyone else have any other decent methods to prevent...
quzah you failed to understand the main point of my post: sincere replies only please.
I don't know why everyone must act like a smart ass when people ask legitimate questions.
However, you did...
I'm trying to hone and expand my C programming skills and I wanted to get some ideas on the best way to get user input at runtime, not command line, to avoid overflow.
This isn't for any program...
High level programming languages are all so similar (at least logically speaking), so the benefits of knowing one language thoroughly will spill over.
The best reason to learn C is that most...
That is the natural tradeoff in Computer Science...and I agree a hashtable would be your best bet in this case even though you're probably sh!t out of luck if it's due tomorrow and you're not...
This is a good question and it has many uses as well.
One of the more common uses relates to hashing and how to handle collisions when more then one item hashes to the same location. A very easy...
I've been programming in C/C++ for years and I just recently started learning about window creation.
Here is an excellent site for learning the basics of window creation step-by-step:...
I was wondering if anyone has run into this problem with XP and how they were able to fix it.
Here is a sample menu entry in my resource file if someone could tell me how I can fix it so it...
Yes I believe you are right. I thought at first that renaming the folder worked, but after closer inspection the program still had not encrypted the files. The only thing that had actually occured...
No stupid questions, just stupid people...(just kidding) =)
There is a function prototype in DIRECT.H called _mkdir() for creating directories. This is part of the Visual C++ 6.0 headers,...
I was hoping to avoid encrypting each file within the folder one-by-one.
I did figure out a way to kind of rig-it and force it to work. I simply used the rename() function within stdio.h to first...
Hmm...good idea...thanks I'll try that