Anonymous
Ok thanks alot I start now,you are the frist one helper I am electrical power egn.
Dark
int changeBrightness(int amount) { for(int i = 0 ; i<Rows;i++) for(int j = 0 ; j<Cols ; j++) { if(Image[i][j]>255) { return Image[i][j]=255; } Image[i][j]= amount+Image[i][j]; } }
Dark
please help me and explain where i made mistake I am new to programming and kindly check is is this code made sense aur how to write properly?
Anonymous
Welcome @Sejusa
Даниил
Hello,guys.I want to call function from dll,so I download dll from server to buffer and I need to call function(like showing message box that I have exported from dll)without saving to disk.Analog is LoadLibrary and GetProcAdress,but cons of this method is that file should be located on disk.So is it possible to do it.I’ve checked a lot of forums but I can’t find solution,please help🙏
Anonymous
Anyone in here is good with RAW Sockets in c?
Anonymous
I want to add TCP Options to the Header. I looked through so many Articles in the Net and would be really happy if anyone in here can end my suffering
Anonymous
make a struct considering the size of each field
i saw an article about that in the net as well but it didnt really worked
Anonymous
i mean maybe it would work if i would do it correctly
Anonymous
but i really think i did it correctly
Hadaward 'Solly'
i saw an article about that in the net as well but it didnt really worked
i have a similar project to do involving UDP/TCP client/servers, but I spent the whole day building automatas for a compiler maniac. I'll get back to it 10h from now. But you should try your luck in the off-topic group, cause it's more about networks in general than C.
Hadaward 'Solly'
about "doing it correctly", I also messed up the first time I made a struct for NTP. Forgot 2 32-bit fields and my message kept being labeled as malformed, but I had no idea what was wrong haha... So yeah, It happens.
Hadaward 'Solly'
I kept looking at wireshark and only noticed after 20min
Hadaward 'Solly'
#ot
Anonymous
Thank you sir
M
Hello , how can write c code to connect wifi ? I have to use dos.h ?
olli
Hello , how can write c code to connect wifi ? I have to use dos.h ?
depends on your operating system, for windows you can take a look at the functions in wlanapi.h
olli
I am using Kali Linux
you can have a look at nl80211 or look for APIs that are provided by the network manager used by Kali
꧁༒ 9H4WK ☬꧂
2) Using two nested do…while loops, write a program that prints out the following output. NB: The program should not have more than two loops. (8 marks) * * * * * * * * * * * * * * * * * * * * * * * * * * * *
꧁༒ 9H4WK ☬꧂
help me guys please
olli
help me guys please
what have you done so far?
꧁༒ 9H4WK ☬꧂
what have you done so far?
#include <stdio.h> #include <stdlib.h> int main() { int row=1,column=1; int i; do{ i=8; do{ i--; }while(i>=row); column=1; do{ printf("*"); printf(" "); column++; }while(column<=row); printf("\n"); row++; }while(column<=6); getch(); return 0; }
꧁༒ 9H4WK ☬꧂
how can i use two do...while loops
Luffy
Can any one code How to sort linkedHashMap by value using compare interface in JAVA.. NOTE: LinkedHashMap
olli
#include <stdio.h> #include <stdlib.h> int main() { int row=1,column=1; int i; do{ i=8; do{ i--; }while(i>=row); column=1; do{ printf("*"); printf(" "); column++; }while(column<=row); printf("\n"); row++; }while(column<=6); getch(); return 0; }
You can combine your inner two loops like this. Because notice, if you assign column before the first loop, the condition will always be true until you execute the body of the second loop. do { if (i >= row) { --i; } else { printf("*"); printf(" "); column++; } } while (column <= row);
Dd
Hi
mahdi13
hi can i compile c++ code with gcc?
mahdi13
g++
hi bro thank you
M
How can I download a c headers ? I need a networkmanager.h and I tried Linux-headers-$(uname r) but still there aren’t header of network manager
Nameful
Usually you can find such files in something like NetworkManager-dev or NetworkManager-devel
Nameful
Depends on your distribution
Nameful
I installed dev let me try devel Thanks 🙏🏻
Your distribution has either dev or devel. They're just two different conventions. If you have NetworkManager development files installed and they still can't be found you may need to specify NetworkManager's include path
Name
Hello everyone Please help me to understand execve input parameters It expects the const char* const* variable. What does the second const* mean?
Name
@unterumarmung thx for your help. Can you please share a related source of info for this topic?
olli
https://cdecl.org/ is a pretty neat when you want to translate "C gibberish" to English const char* const* x translates to declare x as pointer to const pointer to const char [1] It's especially nice for more complex types such as char (*(*x[3])())[5] "declare x as array 3 of pointer to function returning pointer to array 5 of char"
Name
In the exercise I do we run echo %HOMEPATH% in cmd. For this purpose I wanted to do it like this execve(“cmd”, “echo %HOMEPATH%”, NULL) However, it seems to be incorrect as the second argument of the function limits to 1 character
Anonymous
#include <stdio.h> void main(void) { int menu, numb1, numb2, total; printf("enter in two numbers -->"); scanf("%d %d", &numb1, &numb2 ); printf("enter in choice\n"); printf("1=addition\n"); printf("2=subtraction\n"); scanf("%d", &menu ); switch( menu ) { case 1: total = numb1 + numb2; break; case 2: total = numb1 - numb2; break; default: printf("Invalid option selected\n"); } if( menu = = 1 ) printf("%d plus %d is %d\n", numb1, numb2, total ); else if( menu = = 2 ) printf("%d minus %d is %d\n", numb1, numb2, total ); } Can you explain the output error from the text?
Xudoyberdi
i dont think we can use if else
Raging_bull
I think we can 😅
Roshan
i dont think we can use if else
I was correcting his code 🙄
Xudoyberdi
Xudoyberdi
Raging_bull
impress me
Output the same code using if else ? 😅
Xudoyberdi
i wanna learn from you
Raging_bull
show me
Sure😃
Xudoyberdi
where is if else?
Raging_bull
i wanna learn from you
Not an expert even I'm learning
Xudoyberdi
Sure😃
uh you gonna use if else over switch cases, huh?
Roshan
where is if else?
Wrong code wait....
Raging_bull
Xudoyberdi
Xudoyberdi
nays
Xudoyberdi
thanks
Roshan
Well
Roshan
I'm deleting this big mess
Anonymous
Wanna find biggest or smaller number without using and condition or loop?
Anonymous
#include<bits/stdc++.h>    int main () {    int a = 15, b = 20;    printf("max = %d\n", ((a + b) + abs(a - b)) / 2);    printf("min = %d", ((a + b) - abs(a - b)) / 2);    return 0; }
Anonymous
try this (:
christian
#include <stdio.h> void main(void) { int menu, numb1, numb2, total; printf("enter in two numbers -->"); scanf("%d %d", &numb1, &numb2 ); printf("enter in choice\n"); printf("1=addition\n"); printf("2=subtraction\n"); scanf("%d", &menu ); switch( menu ) { case 1: total = numb1 + numb2; break; case 2: total = numb1 - numb2; break; default: printf("Invalid option selected\n"); } if( menu = = 1 ) printf("%d plus %d is %d\n", numb1, numb2, total ); else if( menu = = 2 ) printf("%d minus %d is %d\n", numb1, numb2, total ); } Can you explain the output error from the text?
#include <stdio.h> void main(void) { int menu, numb1, numb2, total; printf("enter in two numbers -->"); scanf("%d %d", &numb1, &numb2 ); printf("enter in choice\n"); printf("1=addition\n"); printf("2=subtraction\n"); scanf("%d", &menu ); switch( menu ) { case 1: total = numb1 + numb2; break; case 2: total = numb1 - numb2; break; default: printf("Invalid optionselected\n"); } if(menu == 1) printf("%d plus %d is %d\n", numb1, numb2, total ); else if(menu == 2) printf("%d minus %d is %d\n", numb1, numb2, total ); } this is the correct code
mahdi13
help please i can't compile in vs code error: Include file not found in browse.path.
olli
help please i can't compile in vs code error: Include file not found in browse.path.
That's (most likely) not a compile error, it does not prevent you from compiling. This site list options to configure the C/C++ extension https://code.visualstudio.com/docs/cpp/customize-default-settings-cpp