Anonymous
What does copy assignment && move constructor && move assignement mean here ?? Can someone plz give a brief explanation about them and what this table basically denotes ...
It is not easy to explain copy assignment and the move operators in a forum like this. You will have to read about them from a good book like C++ Primer by Stanley Lippman or C++ Programming and Design by Bjarne Stroustrup. The table just lists out when these methods are generated (or defined as deleted).
Anonymous
Hey, I have two strings, the first is the data "1 | 2 | 3", the second is the types I expect "int | uint32_t | uint64_t". I need to convert this data to the appropriate types and substitute it as parameters in a function. How to achieve this in C ++ 11?
If the range of types expected is fixed, then you can simply parse the strings and do an appropriate conversion. Like how you would write a parser: if (type == "int"){ try{ boost::lexical_cast<int>(first string); } catch (Exception e) {} } If you use C++17, then lexical_cast is available in the standard library.
Anonymous
i can't do this simply) All data and types comes in run time
You can't do that in C++ then unless you have reflection support which unfortunately is not slated in for any time in the near future. And I doubt that the reflection support would include mapping a string representing the name of a type to the actual type. It would offer support for it the other way around.
Anonymous
even boost doesn't support it?
How can it? C++ is a statically typed language without reflection support. How can Boost work around this? Most of what Boost does will appear like magic and seem to ever extend the realm of possibilities that C++ can achieve but this is not something that even they can do
Sandeep
Did any one come across a good research paper related to computer science
Anonymous
Did any one come across a good research paper related to computer science
There are tonnes of research papers. What do you mean by any? Be specific.
Sandeep
Anonymous
May be related to security
R. L. Rivest and A. Shamir and L. M. Adelman, A Method For Obtaining Digital Signatures And Public-Key Cryptosystems The paper that led to RSA
Marks-Man
May be related to security
DNS Hijacking + Firewall Protection using IPTables
itsmanjeet
Hey all, Any one know whats the meaning and possible reason of getting IOT instruction (core dump) I check internet, strace log, and gdb trace too. Haven't yet get anything usefull
Anonymous
Hey all, Any one know whats the meaning and possible reason of getting IOT instruction (core dump) I check internet, strace log, and gdb trace too. Haven't yet get anything usefull
I don't know what an IOT instruction is but it could be one of the reasons below: 1) Executing a privileged instruction that the code has no access to 2) Executing an instruction that is not meant for the architecture you are running on. This could happen if the flags that you passed to the compiler caused it to generate code for an architecture different from the one you are running your executable on 3) Your program did something illegal which ended up corrupting the memory and the OS decided that it's time of free play was up.
Ultima Filium
I wanna reverse numbers that I get in a for loop but I'm getting negative values
Anonymous
I wanna reverse numbers that I get in a for loop but I'm getting negative values
Show your code. Post it on hastebin, pastebin or gist.github. Don't post your code here
Anonymous
itsmanjeet
Okk, thats why i am getting blogs regarding the SIGABRT
Anonymous
how write annotation for c++
Anonymous
how write annotation doc for c++
Anonymous
is just write it beside source code
Anonymous
or create a new txt(or sth else )for it
Anonymous
how write annotation for c++
What do you mean by annotations? Are you talking about attributes or are you talking about documentation?
Anonymous
always ,what is attributes
Anonymous
always ,what is attributes
Check out gcc attributes. The C++ standard itself has a few attributes like [[nodiscard]] and so on. There is not much support in the way of defining your own like how Java or C# support creating your own annotations. Infact Spring framework in Java was heavily using it (though they did overdo it). You will be restricted to the few that your compiler supports and they are not supported across compilers. If this is what you want, then the best you can do is use static_assert. If you meant documentation, then you write it within the code itself and process it with a tool like doxygen to build the documentation files.
Anonymous
wow
Anonymous
thanks so much
-
Can i know what is the best exercise book and text book for C Programming?
Emre Atakuru
Can i know what is the best exercise book and text book for C Programming?
You can use lots of book but if you're beginner I recommend deitel's books.
Ayomide
Yeah
😎
Yes
Ayomide
Yes
Viprr
Yes
Anonymous
Bhai koi pseudo code me help krdo
Anonymous
/warn english only
Can anyone help me in psedocode
Anonymous
algorithm is correct, some pointers for the low quality code - 1) scanf("%s", ...) is dangerous, use scanf("%99s", ...) 1) conio.h - useless, clrscr(); - useless 2) void main() - standard defines two ways — int main(void) and int main(int argc, char *argv[]). stick to those 3) getch() at the end - useless
Anonymous
hello everyone! I have question) for example we have two numbers 72 and 101 xored between each other (result 45) How decode this xor result only have 45 inside some function?
Anonymous
I have a function in the static library. the task was to solve the algorithm . okay, i did it. Now i need to write some decode function for ascii numbers encode function gives as input some ascii sequence and encrypt it like: str[i] xor str[i+1] Now I need to write decode function, only have encoded sequence(
Anonymous
so, I can do it only with brute force algorithm?
Anonymous
can you tell me which two numbers i added to get this result?
Anonymous
I also think so ...
Anonymous
ye
Anonymous
just think about analogous problems
Anonymous
and ways you can attack them
Anonymous
but if we know that it was xored some asci codes, i can brute force it maybe
Anonymous
but i not shure that some number for example 10 can`t be from few combination of ascii codes)
Anonymous
to produce two xored numbers
Anonymous
to produce two xored numbers
why don't you just think about your problem for a moment ;-; suppose the XOR result is 011 the possible combinations are - 1) 011 000 2) 010 001 3) 111 100 4) 110 101 which one did you start with?
Anonymous
((
Anonymous
I thought about it but still decided to ask)
Anonymous
okay)) thank you very much
Anonymous
okay)) thank you very much
btw XOR has one nice property though, if you know one of the inputs, you can decode the other
Anonymous
yes( shure
Anonymous
011 XOR 101 = 110 (combination 4)
Anonymous
but if we know that it was xored some asci codes, i can brute force it maybe
If you know that it is ASCII code and if you know you are working on English (or any language for that matter) text, then yes there are ways to retrieve the original data. But not for random data
Anonymous
and can you tell me more?)
English language has patterns within it like E is the most commonly occuring alphabet followed by S and so on. There are other patterns like E is more likely to be followed by either a C or an I and stuff. So you can xor E and I and find if that occurs in your xored data. Assume that a E and I produced that, you can go backwards abd forwards to guess other characters. If it results in meaningless text, you can experiment somewhere else where the pattern occured.
Anonymous
interesting way. thank you very much
Bojan_Krdemn
Hi! In class .h i initialized ```Vector<MyClass> collection ```as a private instance variable. How can i access it in class.cpp that is -for example - if (collection.get[0].doSomething() (do something is a MyClass method
shriman_deepak
We have a non leap year. What is the serial number of a given day (month, day)?
Anonymous
🙏people I need a help I was given an assignments to write a c++ program that will accept my name and my ID number, and program that will caculate ""quadratic equation
shriman_deepak
What equation?
ax^2+bx+c=0
shriman_deepak
We measured the lowest (minimum) and the highest (maximum) temperatures for N days. Give the number and the index of the days when the difference between the lowest and the highest temperature was the biggest. Give all day’s index with these biggest difference!
shriman_deepak
Anyone please help me out 🥲
Ultima Filium
hey does the problem on summation of primes Project Euler take long to get the answer cause my computer is taking like forever
Anonymous
Watup