Anonymous
Each image is 153600 byte
To achieving 30 frame per seconds must be I can send almost 36megabit in 1 seconds
Anonymous
Anonymous
Recommendation for doing socket programming in cpp
kaptan
hi guys , how can i read numbers one by one from a text file while there is no space between numbers in the file ? for example:
numbers in the text file:
10298228282928288282
Artöm
Read to a char
Anonymous
Artöm
And subtract '0', youll get an int
Anonymous
Like string s;
getline(s,your_file)
Anonymous
It store 1 line in variable s and then read any character from that line like s[8] to read 7th charater from that string
Anonymous
Loop through that to read line by line of your file
Anonymous
That's it
kaptan
but i am not allowed to use string or array
Anonymous
Can you send me the question
kaptan
can i send it in private?
Anonymous
Oo
Anonymous
Ok*
kaptan
oh i handled it by using char , thanks
Anonymous
Ok
The WARRIOR
Anybody having c in depth textbook 3 edition by srivastavv...pls send me frndss
Dima
The WARRIOR
The WARRIOR
NXiss7
The WARRIOR
Dima
Anonymous
Dima
lol
klimi
Dima
no one needs frontend in c++ group
klimi
ok ok
Rider
Can anyone help me to solve this....
Rider
Plz guy's
Dima
bruh
Dima
WHY
Rider
Facing a problem
Anonymous
Guys please i need help. I want to create a cli app that stores info(objects, struct, arrays) even when I exit the application with c++. Can anyone show me how to go about this?
Artöm
Save stuff to a file
Artöm
Or make a daemon
Dark
I am sorry to ask but the boost library, can you make stand alone applications using it?
lukas
Hey, how can i integrate this lib https://github.com/HowardHinnant/date to my arduino ide?
El
Hello!
Anonymous
Hello
RK
/rules
Anonymous
Hi guys, how are you?
Which is the best book or site one can recommend a 12yr old to begin learning C program?
Anonymous
professor
Rico
RK
For linked list, will the head be member of LinkedList class?
kartik
Hello
DEAD POOL
@ factpoll for computer gk poll
Batu
Hello guys i have to create a graph. And i have to use adjacency list. Bir the number of vertex is not clear. Can anyone help me?
RK
Anonymous
struct nlist *lookup(char *);
char *strdup(char *);
/* install: put (name, defn) in hashtab */
struct nlist *install(char *name, char *defn)
{
struct nlist *np;
unsigned hashval;
if ((np = lookup(name)) == NULL) { /* not found */
np = (struct nlist *) malloc(sizeof(*np));
if (np == NULL || (np->name = strdup(name)) == NULL)
return NULL;
hashval = hash(name);
np->next = hashtab[hashval];
hashtab[hashval] = np;
} else /* already there */
free((void *) np->defn); /*free previous defn */
if ((np->defn = strdup(defn)) == NULL)
return NULL;
return np;
Anonymous
/* lookup: look for s in hashtab */
struct nlist *lookup(char *s)
{
struct nlist *np;
for (np = hashtab[hash(s)]; np != NULL; np = np->next)
if (strcmp(s, np->name) == 0)
return np; /* found */
return NULL; /* not found */
}
Anonymous
struct nlist { /* table entry: */
struct nlist *next; /* next entry in chain */
char *name; /* defined name */
char *defn; /* replacement text */
};
Anonymous
Patrick
Anonymous
this part
Anonymous
Patrick
this was clear to you or not?
Anonymous
Let me send some pictures.
Patrick
it essentially traverses the lists until it reaches the end
Anonymous
Anonymous
it essentially traverses the lists until it reaches the end
np = hashtab [ hash(s)]
First, Why the above statement is the first element of the array? We just put a random number in the index, what guarantees that that would be the first element of the array?
Second, why np = np -->next is the next element of the array?
Patrick
what does this project do? I think you'll have a better understanding of it than anybody
Anonymous
Patrick
I hope someone else can help you, because I can't understand why it's using that hashtable[hash(s)] and then searching right
Anonymous
@phunanon here we created *hashtab[HASHSIZE] without any NULL element, but in the for statemeny , we reietrate the loop untill NULL is found. for the first element to look up, how we find NILL considering we have'nt defined a NULL element at this point?
Ибраги́м
Anonymous
Ибраги́м
1998 ?
Anonymous
1998 ?
a shot from K&R book.
Patrick
Patrick
so if the list had no nodes after the first one it wouldn't iterate
Anonymous