Владислав
Hi! I need to build a working example using the libwireshark, specifically utilizing a dissector from Wireshark's epan/dissectors for analyzing my pcap packets. However, I'm struggling to find any resources that could help me get started with libwireshark. Could you please share a working example for Linux (Fedora), or provide any advice if you've encountered a similar issue?
The example I tried is macOS-specific, it doesn't work on Linux with version wireshark-3.6.13. There are too many issues during the build.
27Onion
مرتضی
Riccardo
hi!, somebody can help me?
Danya🔥
Rose
hi!, somebody can help me?
Don't ask meta questions. In other words, don't ask to ask. Questions like "Does anyone know XYZ?", "Has anyone used XYZ?" or "Can someone help me?" are all considered meta questions because they don't specify what your actual problem is.
These questions give the impression that you want people to approach you and offer their help as if they don't have any other work to do. Now doesn't that expectation make you look like an idiot?
If you have a question ask it directly. You are more likely to get a response that way.
Riccardo
so Sorry
Riccardo
I would like to know how to add graphics in a c++ program
A
Danya🔥
Danya🔥
Don't you think someone already asked this?
Yash
A multiple of a number ,num, is a number cand be devided by num.for example,the multiple of 5 are 5,10,15,20, 25, and so on. The lowest common multiple (LCM) of two numbers, a and b, is the smallest positive number that is a multiple of both a and b program in CPP language
harmony5 🇺🇳 ⌤
A multiple of a number ,num, is a number cand be devided by num.for example,the multiple of 5 are 5,10,15,20, 25, and so on. The lowest common multiple (LCM) of two numbers, a and b, is the smallest positive number that is a multiple of both a and b program in CPP language
Use euclids algorithm for gcd and you can calculate the lcm from that
Rose
A multiple of a number ,num, is a number cand be devided by num.for example,the multiple of 5 are 5,10,15,20, 25, and so on. The lowest common multiple (LCM) of two numbers, a and b, is the smallest positive number that is a multiple of both a and b program in CPP language
User Yash has 1/2 warnings; be careful!
Reason:
assignment
Leovan
Is it possible to write a macro which will declare a lot of same variables? (using array instead is not suitable for me in this case).
For example:
MACRO(count); // will produce:
int value_1;
int value_2;
int value_3;
...
int value_count;
Danya🔥
Leovan
Why?
It's a long story: because Direct3D doesn't allow static samplers arrays and also I don't want to create 30 samplers myself
Danya🔥
Leovan
Also is it possible to do like this:
VARIABLE(slot) variable##slot
but slot is some expression, not literal, for example:
int s = 10;
VARIABLE(s); // should convert to variable10
𝔖𝔞𝔯𝔬
Danya🔥
Danya🔥
You just want arrays :)
Riccardo
Riccardo
Riccardo
Sorry
Samır
Sorry
It’s okay, he’s just joking
Danya🔥
Ya deway
Im having problem using .asm file inside my kernel driver c++ project for Windows10. I have declared a global function inside asm that Is corrected compiled, but when i use extern C and the name of assembly function says not found
Ми🐳а
Can you help me how I can use one variable to implement the code properly because I have a memory limit of 2mb in my assignment?
Ми🐳а
#include <stdio.h>
#define is_power_two(n) (((n) != 0) && !((n) & ((n) - 1)))
int main() {
int n;
scanf("%d", &n);
for (int i = 0; i < n; ++i) {
scanf("%d", &n);
printf("%s\n", (is_power_two(n) ? "YES" : "NO"));
}
return 0;
}
Ali
Any eBPF XDP Expert?.
Inbox me plz
harmony5 🇺🇳 ⌤
Rose
Any eBPF XDP Expert?.
Inbox me plz
Don't ask meta questions. In other words, don't ask to ask. Questions like "Does anyone know XYZ?", "Has anyone used XYZ?" or "Can someone help me?" are all considered meta questions because they don't specify what your actual problem is.
These questions give the impression that you want people to approach you and offer their help as if they don't have any other work to do. Now doesn't that expectation make you look like an idiot?
If you have a question ask it directly. You are more likely to get a response that way.
D
Also is it possible to do like this:
VARIABLE(slot) variable##slot
but slot is some expression, not literal, for example:
int s = 10;
VARIABLE(s); // should convert to variable10
You may use macro which rolls out into a switch-case statement:
#define CASE(num, expr) \
case num: value_##num = (expr); break;
#define SET_VAR(num, expr) \
switch(num) { \
RECURSIVE_CASE_GENERATOR(expr, num); \
}
where RECURSIVE_CASE_GENERATOR will make an index sequence from 0 to 'num' and use it as values for 'case' statements.
Unfortunately, you cant do a truly recursive macro, so that means you'll write something like:
#define RECURSIVE_1(expr, num) case num: value_##num = (expr); break;
#define RECURSIVE_2(expr, num) RECURSIVE_1(expr, num); case num: value_##num = (expr); break;
// ...
#define RECURSIVE_N ...
This way you'll get runtime dispatch as you wanted
Danya🔥
D
That's a common technique when you're stubborn enough not to use codegen hehe
Btw this project:
https://github.com/Hirrolot/metalang99
showed that a macro can have at most 128 params, so is the upper bound for recursion
Kevin
Hi
harmony5 🇺🇳 ⌤
Rose
Hi
Don't ask meta questions. In other words, don't ask to ask. Questions like "Does anyone know XYZ?", "Has anyone used XYZ?" or "Can someone help me?" are all considered meta questions because they don't specify what your actual problem is.
These questions give the impression that you want people to approach you and offer their help as if they don't have any other work to do. Now doesn't that expectation make you look like an idiot?
If you have a question ask it directly. You are more likely to get a response that way.
harmony5 🇺🇳 ⌤
Leovan
Rose
User . has 1/2 warnings; be careful!
Reason:
Automated blocklist action, due to a match on: t.me/joinchat/*
Ya deway
Hi guys, did u know how i can edit my thread stack trace in C++? Im developing in kernel mode. I would like handle the return address of my function
Rose
Welcome S❤️!
Please read the pinned message 🙂
Click the button below to unmute yourself.
Rose
Welcome Yaswanth!
Please read the pinned message 🙂
Click the button below to unmute yourself.
harmony5 🇺🇳 ⌤
!report @Legend_Mubeen
Danya🔥
harmony5 🇺🇳 ⌤
Oh, I already deleted the chat, sorry
harmony5 🇺🇳 ⌤
I guess the report won't go on, then
𝐌𝐢𝐜𝐡𝐚𝐞𝐥 𝐁𝐞𝐤𝐞𝐥𝐞
/notes
Rose
/notes
List of notes in C/C++ Programming:
- 0_to_show_item_use"#item"
- gitgud
- howtoask
- markdown
- mcve
- meta
- ot
- paste
- projects
- res
You can retrieve these notes by using /get notename, or #notename
𝐌𝐢𝐜𝐡𝐚𝐞𝐥 𝐁𝐞𝐤𝐞𝐥𝐞
book
𝐌𝐢𝐜𝐡𝐚𝐞𝐥 𝐁𝐞𝐤𝐞𝐥𝐞
#res
Rose
#res
Please check out this channel - @Resources for information on learning sources for C and C++ (books and videos) and Frequently Asked Questions.
Erik
Hello, I want to have some variables that can be read and editable by every file on my cpp program(like a shared memory by all the files). I now 2 methods : i create a singleton and I return the instance every time I need or i create a file where the variable are extern. What do you advice? Are there other methods that I don't now about?
مرتضی
you might want to check out this code: https://github.com/tidwall/hashmap.c
hi 👋
today i found some time to test this library and faced a problem.
i downloaded hasmap.c and hashmap.h files and moved those files to my source location
imported in c file and tried to compile it using this command :
gcc source.c
but it returns :
/usr/bin/ld: /tmp/ccAOESxr.o: in function `user_hash':
switch.c:(.text+0xc3): undefined reference to `hashmap_sip'
/usr/bin/ld: /tmp/ccAOESxr.o: in function `main':
switch.c:(.text+0xf6): undefined reference to `hashmap_new'
/usr/bin/ld: switch.c:(.text+0x11d): undefined reference to `hashmap_set'
/usr/bin/ld: switch.c:(.text+0x16a): undefined reference to `hashmap_iter'
/usr/bin/ld: switch.c:(.text+0x17a): undefined reference to `hashmap_free'
collect2: error: ld returned 1 exit status
what should i do ?
how should i compile my source file ?
any additional flags or tags ?
im in linux env. btw.
Eng\Mohammed Alhomaidi
Hi guys🫡
what the best reference to learn c++?
Eng\Mohammed Alhomaidi
KEVIN
#projects
Rose
#projects
Please check the Resources section for links on Open Source Projects in C/C++ some of which are explained from scratch.
Kcca
Please can someone help me to solve this; Use C programming language to sort grades of students using arrays and variables
klimi
Kcca
Oops I deleted the image 😴
\Device\NUL
27Onion
27Onion
so maybe like, say, gcc source.c hashmap.c
27Onion
otherwise the compiler can't figure out where the implementations are
27Onion
it's better to use a shell script or a makefile, something like that, tho, but it should work by just appending the hashmap.c to the compile command
klimi
It depends what you want from cookies
klimi
I think i got lost... Can you rephrase what is you goal and what is your problem?
Hackker
xpasspro
Rose
User Problem has 1/2 warnings; be careful!
Reason:
offtop
Rose
Offtopic discussions should be done in the C/C++ Offtopic group. Please take your discussion/questions there.