🕸 03xploit 🕸
Hi guys How to download file with real name on current directory?
Ammar
Hi guys How to download file with real name on current directory?
What do you mean? Download file on what? Your question is too vague.
🕸 03xploit 🕸
I want download multiple file X.exe y.exe f.exe Download this files with their own names and extensions in to executed file (where run my program)
Язиля
#hiring #C++ #Embedded #Berlin For an IOT solution company which is specialized provider of networked solutions based in Berlin, I'm looking for a Lead Embedded Developer with C++ experience and experience in Embedded OS. German B2-C1 level is required. Salary up to 90k. https://gist.github.com/Yazilya/8a0d8a16abc020dd3fd1ef649a3fc613 Will be happy to share more details by contacts: Telegram: @Yazilya_n Skype: next_speaker e-mail: globalminds.yn@gmail.com
Dima
^ approved post
toytta
Hello everyone, Does anyone know how to simulate an fetch-decode-execute cycle in C?
[Gaal wase bilaa cashuur ]?_ 2 grals
Never mind
Fontah
Pls i need help with making an inverted array using C
Fontah
Any ideas
klimi
inverted as in inverted indexes or inverted values?
Fontah
Inverted values
Stefano
You can use a second array or a temp variable
Fontah
You can use a second array or a temp variable
Intressting but how do i do that
Stefano
Intressting but how do i do that
if you use a second vector you just use a for to equal the first element of vector 1 with the last element of vector 2 and so on (vector 1 scrolls forward while vector two scrolls backwards). using a temporary variable is simpler: put the value of the first position on temp, the value of the last position in the first and the value of temp in the last position
J
Pls i need help with making an inverted array using C
It's easy, it's hard for you because you've not started coded and there not put your brain to work. Create a for loop and initialize a variable for the loop to the size of the array minus 1. Then end the loop if the variable is greater than or equal to 0. Then decrement the loop
J
Something like this: for(int i=size_of_array - 1; i>=0; i--)
Put ur thinking to work by coming up with the code inside the for loop, nobody will do that for you. Have a nice day
Fontah
The*
J
Let us see your code you've implemented with that is showing error?
Fontah
Void invert(float T[ ], int n) { Int i; Float t; For(i=0;i<=n;i++) { t =T[ i ]; T[ i ] =T[ n-i-1 ]; T[ n-i-1] =t ; } For(i=0;i<n;i++) { Printf(" \n%d",T[ i ] ); } }
J
#include <iostream> using namespace std; int main() { int size=5; int array[size]={1, 2, 3, 4, 5}; cout<<"Array elements is: "; for(int i=0; i<size; i++) { cout<<array[i]<<" "; } cout<<"\nArray elements inverted is: "; for(int i=size-1; i>=0; i--) { cout<<array[i]<<" "; } return 0; }
Mohammad
Hello I am a web developer and I live in Iran. I am looking for a friend of a non-Iranian programmer who can collaborate on programming. If anyone would like to send me a message in person
J
yes its very good
You can send a DM, I will be happy to work with you
J
Void invert(float T[ ], int n) { Int i; Float t; For(i=0;i<=n;i++) { t =T[ i ]; T[ i ] =T[ n-i-1 ]; T[ n-i-1] =t ; } For(i=0;i<n;i++) { Printf(" \n%d",T[ i ] ); } }
Bro in your code here: you declared i outside the two for loops..are you aware of this?...cos you declared another variable named i again inside the for loop. This for loop i's will definitely hide the outer variable declared outside the loops. So I think this is one run-time error in your code
hiddenpiggy
Intressting but how do i do that
If you wanna use a second vector to implement a matrix.. You can initialize this vector like this... void init(vector<vector<int>>&mat, int m,int n) { mat.resize(m); //for every row in mat for(auto &row:mat) { row.resize(n); std::fill(row.begin(),row.end(),0); } }
hiddenpiggy
I guess a C-style implementation is not that simple..
hiddenpiggy
Void invert(float T[ ], int n) { Int i; Float t; For(i=0;i<=n;i++) { t =T[ i ]; T[ i ] =T[ n-i-1 ]; T[ n-i-1] =t ; } For(i=0;i<n;i++) { Printf(" \n%d",T[ i ] ); } }
Maybe you can invert an array like this... void revert(std::vector<int>& vec) { std::reverse(vec.begin(),vec.end()); }
hiddenpiggy
or be more generic ... template <typename T> void revert(std::vector<T>& vec) { std::reverse(vec.begin(),vec.end()); }
hiddenpiggy
I wonder how to implement raii features in pure C... any ideas?
Anonymous
I wonder how to implement raii features in pure C... any ideas?
There are gnu Extensions to automatically call functions
Anonymous
I wonder how to implement raii features in pure C... any ideas?
https://www.youtube.com/watch?v=QpAhX-gsHMs&pp=qAMBugMGCgJydRAB
Anonymous
Anonymous
https://phoxis.org/2011/04/27/c-language-constructors-and-destructors-with-gcc/
hiddenpiggy
thank you
Anonymous
Pardon me but off-topic upcoming
Anonymous
Can anyone tell me what is wrong with the below statement describing the decode phase of the instruction cycle especially the D7 part?
Anonymous
Can anyone tell me what is wrong with the below statement describing the decode phase of the instruction cycle especially the D7 part?
Now in the decoding phase, the instruction is decoded by the control unit of the CPU as per the operation code. Now the control unit is to decide the type of the instruction. There are 3 types of instructions; memory reference instruction, register reference instruction, and input and output instructions. The opcode can have 8 possible values starting from D0 to D7 or in other words 000 to 111. The type of the instruction is decided by the decoder as per the value of the D7. If the value of D7 is 0, then the instruction type is memory reference type. If the value of D7 is 1, then the instruction type can be either register reference or I/O reference type. At this stage, the CPU refers to the value of the 16th bit of the instruction format. If D7 = 1 and the address mode, I is 1, the instruction type is register reference type, otherwise, when I is 0, the instruction type is I/O reference type. The decode phase of the instruction ends after deciding the type of instruction and subsequent decisions based on the address mode bit. For the memory referencing instruction, the decode operation decides the addressing mode using the I bit as described earlier; 0 for direct addressing and 1 for indirect addressing. Instruction execution:
Anonymous
Someone help me guys I need an example of a programm that uses switch
Anonymous
A basic calculator. With +,-,*,/
Derick do u perhaps have an example please ill appreciate....
Anonymous
Derick do u perhaps have an example please ill appreciate....
Sorry. I don't understand what u mean
.
Thanks a lot,,have just started learning this c++,
Anonymous
Thanks a lot,,have just started learning this c++,
Start by reading the pinned rules 🙂
J
Someone help me guys I need an example of a programm that uses switch
Are you learning c++ or you want a problem to be solved?...If you're learning, then come up with the way you think you can solve it, then we'll help you out to.....we can't give you the code without you showing your efforts. So show us your example
Anonymous
#include <iostream> using namespace std; int main () { // local variable declaration: char grade = 'B'; switch(grade) { case 'A' : cout << "Excellent!" << endl; break; case 'B' : cout << "Well done" << endl; break; case 'C' : cout << "Average" << endl; break; case 'D' : cout << "You passed" << endl; break; case 'E' : cout << "Better try again" << endl; break; default : cout << "Invalid grade" << endl; } cout << "Obtained Grade : " << grade << endl; return 0; }
Anonymous
Is thea any other way to write this code in C++ ???
Sds
I wanted to output hours worked and rate of pay of 2 employees, accountant and engineer Am a begginer in c++ Is the program below ok?
Sds
#include <iostream> using namespace std ; class Employee { private : int Age ; float bonuses; float basicSalary; public: string occupation; int hours,RateOfPay; void hoursRateOfPay () { cout << "The hours worked by the "<<occupation << " is " << hours << endl; cout << "The rate of pay of the " << occupation<< " is "<< RateOfPay<<endl; } }; int main () { Employee A ; A.occupation = "Engineer" ; A.hours = 25; A.RateOfPay = 49000 ; A.hoursRateOfPay () ; Employee B ; B.occupation = "Accountant" ; B.hours = 19; B.RateOfPay = 30000 ; B.hoursRateOfPay () ; return 0 ; }
Anonymous
Yes, lot of
Kindly share some if u don't mind I'll appreciate
Anonymous
Hello
Ammar
Hello
nohello.com
Ammar
/report
Wyckie
/report
Anonymous
first is logical or with compare Operator
Anonymous
Can someone explain this line please Int sig = (1<< (obj[i][j] - 1) );
Anonymous
you know bit operator ?
Anonymous
you know bit operator ?
Yeah but I don't understand very well
Prince Of Persia
Anonymous
🤨first send what obj is
It doesn't matter what obj is, I'm asking about the << operator
Anonymous
The << operator move bits to the left side or >> to the right side
Prince Of Persia
Anonymous
example ok
Prince Of Persia
A char is a byte So have 8 bits
Anonymous
integer variable