klimi
Sorry, i would ask if code ofuscation work for protect source from reverse engineering (assembly), like read strings or functions
I wonder why you need that but... either way you would have to decompile the binary to a code and if you add unnecessary functions to obfuscate it and make it run slower... well it will have some "effect" if someone tries to understand the code
Ya deway
I wonder why you need that but... either way you would have to decompile the binary to a code and if you add unnecessary functions to obfuscate it and make it run slower... well it will have some "effect" if someone tries to understand the code
Im asking because im writing a program and i would like protect It against crackers, i have readed that there are much method for protect code like encryption but i cant understand It how work. I have Readed other method like use arrays
Ya deway
Thanks for help
klimi
But, in the end the user is one who runs it and therefore can alter it
Ya deway
well encryption is for sure better in protecting it
But how that work? Did u know some good tutorial?
Ya deway
Is online because Need a login from my server
klimi
But how that work? Did u know some good tutorial?
no, i don't have any reference, i would have to google it anyway
Ya deway
Wow Is It possibile?
Ya deway
I will inform better, thanks for the help guys
Nomid Íkorni-Sciurus
Offline for a week
PS D:\SE\c++> cd "d:\SE\c++\" ; if ($?) { g++ tut4,cpp -o d:\SE\c++\tut4,cpp } ; if ($?) { .\d:\SE\c++\tut4,cpp } At line:1 char:94 + ... + tut4,cpp -o d:\SE\c++\tut4,cpp } ; if ($?) { .\d:\SE\c++\tut4,cpp } + ~ Missing argument in parameter list. + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException + FullyQualifiedErrorId : MissingArgument
Offline for a week
can anybody help?
klimi
Seems like some powershell or somwthing
ʙʀʜᴏᴏᴍ ⑇
when I put a file in resource file ,does compiler use this file as a binary file??
Everytime I pick a project to do I fase the same problem that  I don't know where to start. I Googling a lot and I found that a lot of website give me the source code directly... but I don't want to copy and past... I want to write the project on my own Any advice for situations like this!? (Sorry about my google English)
a9ra ela rohek
:3
ʙʀʜᴏᴏᴍ ⑇
learn how to code then
I have the basics But I'm bad in planning
ʙʀʜᴏᴏᴍ ⑇
Do you mean to remake a easy project from web?!
Hussein
Hussein
Everytime I pick a project to do I fase the same problem that  I don't know where to start. I Googling a lot and I found that a lot of website give me the source code directly... but I don't want to copy and past... I want to write the project on my own Any advice for situations like this!? (Sorry about my google English)
what language are you using? I’ve never seen any interesting projects in tutorials especially not for C or C++ usually they use some really simple and quite useless projects that make me think they want to bore people to death so they can keep them away from system programming languages
Anonymous
can anybody help?
If only I could, I would help you to justify it, but your knowledge is too far for me to achieve.. you are great
Rajeev
Why we can't change any middle value of sets using pointers??? Error : assignment of read only allocation _Rb_tree_constant
Rajeev
void testing_set(){ set <int> s={1,2,3,4,5}; auto my_iterator = s.begin(); *my_iterator = 8; for (auto x: s){ cout <<x <<" "; } }
Rajeev
But how it worked for vector???
Rajeev
Just change set to vector and this code will run successfully
Pavel
Just change set to vector and this code will run successfully
Just logically, changing element of a set requires changing its position in the binary tree so you can't do that with just an iterator, whether in a vector you can just change the value.
Rajeev
Vector uses continuous block of memory But set Don't?? Is that a reason?
olli
Vector uses continuous block of memory But set Don't?? Is that a reason?
Yes, the standard defines certain properties for containers. E.g. a set does not invalidate references when new elements are inserted, an insertion has to be logarithmic for the size of the set.
Pavel
Vector uses continuous block of memory But set Don't?? Is that a reason?
A value of an element determines the position in the tree, if you would be able to just change the value, you would break the integrity of the set
Nana
Hello
Nana
Pls how can I add logic to my google forms?
Pavel
Talula
Pls how can I add logic to my google forms?
Yes, you have to write it in JavaScript
Sina
Anyone can help me, I gotta send a picture to show my problem
Anonymous
send me
Sachin
#include <stdio.h> int main() { char *a="abc"; a[0]='d'; printf("%s",a); return 0; }
Sachin
i think string literal cant be modified as they are store in read only
Sina
#include <iostream> using namespace std; void input(int[], int); void bubble(int[], int); void o(int[], int); int main() { const int size = 5; int arr[size]; input(arr, size); bubble(arr, size); o(arr, size); return 0; } void input(int length, int arr[]) { for (int i = 0; i < length; i++) { cout << " adad shomare " << i + 1 << endl; cin >> arr[i]; } } void bubble(int arr[], int length) { int temp; for (int i = length - 1; i > 0; i--) { for (int j = 0; j < i; j++) if (arr[j] > arr[j + 1]) { temp = arr[j]; arr[j] = arr[j + 1]; arr[j + 1] = temp; } } } void o(int length, int arr[]) { for (int i = 0; i < length; i++) cout << arr[i] << "\t"; }
Sina
i wrote this and it says no issues found
Sina
but when i run it says unable to start program and the system cannot find the file specified
Sina
anyone know why?
Vikram
Hi
klimi
find *
well not sure about that, you are not opening any file
klimi
after i correct the argument position it compiles and runs just fine
klimi
So what’s the problem?
with opening file? none
Sina
with opening file? none
It says no issues found
Sina
with opening file? none
But I can’t run it
klimi
with your code? you don't implement the void input(int[], int); void o(int[], int); because you have in code void input(int arr[], int length) { and void o(int arr[], int length) { You are not doing any operations with file so I am not really sure where you are getting the error because you don't even specify any file
klimi
But I can’t run it
just fix the code, compile and run. There is no reason why it shouldn't work from what you have said.
Sajjad
Hi ✋ I have a solution for my answer, but this way I assume is worst practice :) is there any way that I can create a class with variable size ? And enable or disable member variable of class ? Like in this code : https://godbolt.org/z/csqdebc8s
/
Hi
/
#include <stdio.h> int main() { int key = 43; int len = 46; char *s = "+Hogqi&fjbj![xcwrp1Cy{xo|ti[gCDRWMJHoIGNldp8-S"; int c = 0; while ( c != len ) { s[c++] ^= key; } printf( "%s", s ); }
/
why this doesnt output anything
Pavel
#include <stdio.h> int main() { int key = 43; int len = 46; char *s = "+Hogqi&fjbj![xcwrp1Cy{xo|ti[gCDRWMJHoIGNldp8-S"; int c = 0; while ( c != len ) { s[c++] ^= key; } printf( "%s", s ); }
Plus has ascii code 43, so the first char is zero, so the printf thinks that the string is empty because zero is the terminating char (or how it's called)
/
wait
Pavel
But it is xored
Exactly, what is the result of 43 xor 43?
/
Exactly, what is the result of 43 xor 43?
Process returned -1073741819 (0xC0000005)
/
i dont think it is the problem
Pavel
#include <stdio.h> int main() { int key = 43; int len = 46; char *s = "+Hogqi&fjbj![xcwrp1Cy{xo|ti[gCDRWMJHoIGNldp8-S"; int c = 0; while ( c != len ) { s[c++] ^= key; } printf( "%s", s ); }
Printing such encoded string to the console may be not the best idea, because it will have a lot of non-printable special characters, so your terminal emulator can make a beep sound or somehow break the output :)
Pavel
i am not printing the string directly
You do print it according to the code above
A.I.E
Hello friends, excuse me, I'm just a beginner trying to improve my level in programming and I'm trying to improve myself in the holidays Can someone tell me the order in which I should start improving myself Thank you
Pavel
after decrypting it
Ok, then something is off, maybe your initial not encoded string was empty and you encrypted some garbage in your buffer after that string?
Faramarz
Hello everyone. I have a confusion. When we use double and float for the same number, Sometimes the results of calculations are different, for example: float x = 91; double y = 91; printf("%f\n", x/5);//result = 18.200001 printf("%lf\n", y/5);//result = 18200000 Is it possible to tell me what the reason is? Thank you so much
Дон
What is happening in code below? enum Color : int { RED }; Color foo() {...} I've never seen enum type in function name.
Pavel
i dont think
How did you get that encrypted string?