Ah, I get it. Thanks a lot!
Type: Posts; User: Ariod
Ah, I get it. Thanks a lot!
It is an array of unsigned chars.
Okay, now I'm so desparate I tried the simplest program possible:
#include <stdio.h>
int main(void) {
FILE *f = fopen("test.txt", "r");
unsigned char...
Hey guys,
I'm trying to read MAC addresses from the following text file:
192.168.1.1 00:0c:41:ae:5a:04
192.168.1.103 00:16:76:1d:4d:a9
192.168.90.130 00:0C:29:F2:25:63...
Hey guys,
I need your help. Do you have any advice on how to generate 100k to 1 million unique random numbers, relatively fast? I have an assignment to compare the times needed to search for a...
Shouldn't it be:
O(1) < O(log(n)) < O(n) < O(nlog(n)) < O(n^2)... for large n's?
Or am I missing something?
And thanks for the input ILoveVectors but I already know that.
Hi,
Could you tell me why the worst-case complexity of the sort() function is O(nlg(n))?
struct s1 {
long code;
struct s1 *next;
};
Hello,
I have a binary search tree consisting of nodes that contain first and last name of students on a college. Below I've written a function that receives student's last name, and should return...
Hi all,
The following code is from one of the programming classes that I used to attend. This function recursively sums the elements in an array. They said that the a priori complexity of this...
Thanks for the tip, I get no warnings now.
So the string (the actual text) is not stored on the stack? Sorry, I'm just trying to understand this.
I'm using Borland's free C/C++ compiler. The file's extension is .c if that means...
Hi,
I have the following code:
#include <stdio.h>
char * returnString () {
Don't yell, I didn't notice your post (look at the time mine was posted).
Thanks though.
I realize they're bad, thanks, but I'm still getting that runtime error on the input for average score.
Hi,
Could you please take a look at the following code? I'm getting a runtime error every time I enter the average score:
struct blah {
char firstname[20+1];
char lastname[25+1];
What do you mean? Could you give an example?
Also, is this line necessary before fputc:
fseek(f, 0, SEEK_CUR);
Could you guys look at the following code?
#include <stdio.h>
#include <stdlib.h>
int main() {
FILE *f;
OK, this is a part of a program that I wrote:
#include <stdio.h>
#include <string.h>
struct info {
Hi,
I'm trying to write a little program that will help me calculate minority and majority carriers in semiconductors based on my input. The program should handle large numbers, typically around...
Thanks, you've been much helpful!!
What I'm actually trying to do is replace ampersands (&) in a HTML file with &. So when the ampersand is found, the program would insert amp; after it.
What you're suggesting is to define a large...
If I use the w mode, it will delete the contents of the file before writing.
Hi all,
I'm having difficulties inserting a string into a text file. Here's my code:
int main() {
FILE *f;
Hi,
You know when you compile and run a program, it says "Press any key to continue" when it's finished running? Or back in DOS, when you list contents of a directory with the command dir /p?
...
Thanks again Jason :)
x - coordinates
cxChar - average character width
iHorzPos - position of the horizontal scroll bar
If client area is scrolled to the left, part of text is being drawn in the negative area of the...