Anonymous
Ok
Anonymous
Thank anywhere
J.K. – Tessier-Ashpool Customer Support
I don't think everybody should learn ASM. But if you love it, that is what you should do. Yeah, mostly CTF *that requires reverse engineering* does need ASM knowledge to work with. But not every CTF, some of them don't touch ELF file at all. So it is your choice to pick the way you go.
Of course. I think so. 😊 My question was more in the line of tracking future plans, make a living... And I know it's somehow hard to answer for several reasons. Although, I have been told many times that professionally ASM has very few doors to choose from. Anyway, the reversing knowledge for CTFs are in general kind of basic?
Φ ☭
Thank anywhere
Welcome :)
Immaterial
How to enable 802.11r using embedded C for router firmware ?
Talula
How to enable 802.11r using embedded C for router firmware ?
Which microcontroller is your router using?
Anonymous
🔰Do you want to develop your CV, Projects with learning at a same time and get Internship. Do not waste your time thinking what to do next. We have great ideas for you. Contact me for further info🔰
Jan
Do these advertising shits come by often?
Yasas
Do these advertising shits come by often?
Most of the time they don't sir
Bharti
#include<stdio.h> int main(){ struct node{ int data; struct node *next; }; struct node *head,*newnode,*temp ; head=0; int choice; while(choice){ newnode=(struct node *) malloc (sizeof(struct node)); printf("enter the data"); scanf("%d",&newnode -> data); newnode -> next =0; if (head==0){ head=temp=newnode; } else{ temp -> next = newnode; temp = newnode; } printf("do you want to continue"); scanf("%d",&choice); } temp=head; while(temp != 0) { printf("%d",temp -> data); temp=temp -> next; } return 0; }
Bharti
let me know the mistakes ...my program isnt running
Anonymous
Thank you
Lol for what ? Btw what error are you getting.
Bharti
Lol for what ? Btw what error are you getting.
Didn't included the library for malloc
Anonymous
i guys i need your help in a project
Anonymous
i have to program a simplified version of the Magic the Gathering (MtG) card game by Wizards of the Coast.
klimi
okay
Anonymous
okay
hello
klimi
hello
Oh right
klimi
I forgot
Anonymous
hhhhh
klimi
Gn
+
hey guys anyone have any example about how to create a dll in c++ I want to create a dll from a lzo compression function that does not available in lzo dll itself
olli
hey guys anyone have any example about how to create a dll in c++ I want to create a dll from a lzo compression function that does not available in lzo dll itself
https://docs.microsoft.com/en-us/cpp/build/walkthrough-creating-and-using-a-dynamic-link-library-cpp?view=msvc-160
hardin
I have manualy configured minGw to compile from VS code. Now am facing the broblem on adding 3rd party libraries. any one with vital information or idea
Immaterial
Can anyone know embeded firmware design & development ??
Anonymous
//define token structure typedef struct structure_token{ union token_value value; enum token_type type; struct structure_token *linked_token; } * p_exp_token; struct token_queue{ pfunc_token head; //create elements of token_queue pfunc_token rear; }; pfunc_token FUNCTION(struct token_queue *pqueue); //function prototype /* Function duty : remove element from the queue Input Output 1 if queue is not empty : address of pqueue->head Output 2 if queue is empty : address of pqueue->head */ pfunc_token FUNCTION(struct token_queue *pqueue){ pfunc_token ptoken = pqueue->head; if(pqueue->head){ pqueue->head=ptoken->linked_token; if(ptoken==pqueue->rear) pqueue->rear=NULL; ptoken->linked_token=NULL } return ptoken; //return address of ptoken }
Anonymous
Can you explain what is the duty of these piece of codes
Anonymous
I couldnt understand
Samvel
/get cbook
Aksa
Hi any coding helpers??
Anshul
in a vector why dont we push elements using cin, why do we use push_back vector<int> a; a.reserve(10); for(int i=0;i<10;i++) { cin>>a[i]; } for(auto x: a) { cout<<a[i]<<" "; } why this code don't work well??
Anshul
also explain what if i don't use a.reserve() here and repeat the same code!
Suka
in a vector why dont we push elements using cin, why do we use push_back vector<int> a; a.reserve(10); for(int i=0;i<10;i++) { cin>>a[i]; } for(auto x: a) { cout<<a[i]<<" "; } why this code don't work well??
ig because not everyone using terminal to input data. vector is a dynamic array you have to reserve it to make space (allocate memory/array) and perhaps you wii get seg faults if you access array index beyond its capacity. cmiiw
Anshul
so i reserve memory equals to 10 here and when i am able to access elements of vector using [ ] then why i can't input using it! compiler don't give any error but it just don't print anything!
Anshul
alright! no problem
olli
in a vector why dont we push elements using cin, why do we use push_back vector<int> a; a.reserve(10); for(int i=0;i<10;i++) { cin>>a[i]; } for(auto x: a) { cout<<a[i]<<" "; } why this code don't work well??
You can do that too, however what if you don't know the number of items to read/write? Using push_back you don't need to worry, whereas using operator[] could result in an out of bounds access.
Anshul
i was trying to prepare a grid of size n*m using vector. so i will first input n and m from user. then i try to create a temp vector n no. of times(number of rows of my grid) and in the temp vector i input "m" number of elements using cin.
Anshul
also please tell me can i use a[i][j] to access i th row and j th column element in vector???? if yes why and how? and if no why not? i tried accessing element like this, compiler gives no error but it doesn't even print anything? please explain me why
Anshul
yea sorry
Anshul
in the for each loop i put a[i] please consider it x
olli
also please tell me can i use a[i][j] to access i th row and j th column element in vector???? if yes why and how? and if no why not? i tried accessing element like this, compiler gives no error but it doesn't even print anything? please explain me why
you can use the syntax a[i][j] if you use a std::vector<std::vector<int>>, e.g. int n = 3; int m = 12; std::vector<std::vector<int>> V(n, std::vector<int>(m, 0)); for (int i = 0; i < n; ++i) { for (int j = 0; j < m; ++j) { std::cout << V[i][j] << ' '; } std::cout << '\n'; }
Anshul
in the for each loop i put a[i] please consider it x
#include<iostream> #include<vector> using namespace std; int main() { vector<int> a; a.reserve(10); for(int i=0;i<10;i++) { cin>>a[i]; } for(auto x: a) { cout<<x<<" "; } }
Anshul
std::vector<std::vector<int>> V(n, std::vector<int>(m, 0));
olli
std::vector<std::vector<int>> V(n, std::vector<int>(m, 0));
std::vector<std::vector<int>> - it's a vector of vectors of ints. V(n, std::vector<int>(m, 0)); - V has n vectors of int, where every vector contains m elements (ints) that are all 0.
Anshul
i have learnt that if i do this vector<int> a(m,0) , this means that this vector a will have m elements and all those will be zero. but if i want to put the elements of inner vector to zero then i don;t know how to do that. i.e. vector<vector<int>> b(n,0)
Anshul
alright! i understood it! thanks alot
Pavel
please explain this too... this code compiles but doesn't print anything
You need to resize it, not reserve. Reserve just makes sure you have big enough buffer but it doesn't change the size of the vector.
Anshul
ok so basically when i try to input elements using cin, it doesn't increase the size of the vector, that is why it doesn't print anything
Anshul
right??
Anshul
and push_back() increases size internally?
Pavel
ok so basically when i try to input elements using cin, it doesn't increase the size of the vector, that is why it doesn't print anything
Yes, when you address your array with square brackets it doesn't do anything with the size (it doesn't even check it).
Anshul
so it's not a good practice to push elements into the vector using cin?? should i always use push_back() function????
Pavel
so it's not a good practice to push elements into the vector using cin?? should i always use push_back() function????
There's nothing bad with push_back elements, usage depends on the stored types. If your types are not default constructable then you do push_back or emplace_back. If you know the size in advance you can do reserve before adding elements, that's a good practice. If your elements are default constructible (or better yet trivially constructible), you can do resize if you know the size in advance. Also, for reading from cin, you can do. vect.push_back(); std::cin >> vect.back();
Deven
If you are interested then please contact
Talula
/report
Talula
@chandradeepdey You look like Aziz Ansari
Anonymous
so it's not a good practice to push elements into the vector using cin?? should i always use push_back() function????
std::basic_istream::operator>>() only extracts characters. it is not about being "good practice", it is about being impossible. use this instead std::istream_iterator<int> cin_iterator(std::cin), cin_end(); while (cin_iterator != cin_end) { v.push_back(*cin_iterator++); } you should decide whether the cin_end is needed part based on the nature of the input. the ++ on the iterator is a no-op, but it is good practice to do it for consistency. oh wait, std::cin >> int works. i am dumb
Good
Hello there, I am working on cpp project which has some dependency on SDk environment.Before running the CMake of the project I need to source the environment file which exports the paths
Good
Is there any way to select the SDK compiler In vscode instead of using regular gcc compiler?
+
Are you the same person who asked this on Discord 🤔?
What discord? Don't say blacksmith😂
spartak
Hi everyone, what courses ( preferably on youtube) , books and sites can you recommend for beddiner in c++