Tag : c++

The following is the log at startup 2018-04-17 06:13:59 InitParameterInteraction: parameter interaction: -connect set -> setting -dnsseed=0 2018-04-17 06:13:59 InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1 2018-04-17 06:13:59 Assuming ancestors of block 0000000000000000005214481d2d96f898e3d5416e43359c145944a909d242e0 have valid signatures. 2018-04-17 06:13:59 Setting nMinimumChainWork=000000000000000000000000000000000000000000f91c579d57cad4bc5278cc 2018-04-17 06:13:59 Using the ‘sse4’ SHA256 implementation 2018-04-17 06:13:59 Using RdRand as an additional entropy ..

Read more

As shown in the figure: Click on the red line in the figure and it will become as shown in the following figure: What do you mean by these keywords and percentages shown in the red box?Address. Indicates the proportion of programming languages in t..

Read more

Note that standard-conforming allocators use many language features that are not yet widely implemented. In particular, they rely on member templates, partial specialization,partial ordering of function templates, the typename keyword,and the use of the template keyword to refer to a template member of a dependent type. This is the bold part, please explain, don’t understand. ..

Read more

brief introductionJoseph ring problem is an old problem. Suppose there are n people in a circle, starting from one of them in a clockwise directionStart counting, those who report for 2 will be listed, and the next one will continue to report from 1. (This will cause the circle to get smaller and smaller) until ..

Read more

If you want to use strcpy () to assign character array a to b, there are some doubts: char a[]=”abcdef”; char b[]=”666″; strcpy(b,a); Then the program is executed normally.I think: in principle, the length of b is not enough, that is to say, the program actually uses the surplus numbers stored only after the last ..

Read more

I am trying to move a file to the system directory. Why can’t I move it, that is, what permissions do I need to manually move it? Can this problem be solved? Linux runs programs with sudo permissions.Windows runs programs with administrator privileges If any program has the right to modify or replace the system ..

Read more

The theme is to enter several strings, call a function and sort them. After that, the main function outputs the function after the order of numbers is taken. But it doesn’t work. Array access out of bounds #include <stdio.h> #include <string.h> int main() { void sort(char* []); int i; char* p[3]; char str[3][3]; for (i ..

Read more

Why?fun()The function changes the value of the argument andfun_Function does not? #include <stdio.h> void fun(int *q,int *p,int *w) { *w=*q; *q=*p; *p=*w; } void fun_(int *q,int *p,int *w) { w=q; q=p; p=w; } int main() { int a=2,b=3,c=4,*q=&a,*p=&b,*w=&c; fun(q,p,w); //then use fun_(q,p,w); printf(“q=%d p=%d w=%d”,*q,*p,*w); return 0; } I can’t understand.Please be careful. I read ..

Read more

#include<bits/stdc++.h> using namespace std; int n; void next(int *p) { int i,j,t; for(i=n; i>=2; i–) if(p[i-1]<p[i]) break; for(j=n; j>=i; j–) if(p[i-1]<p[j]) { t=p[j]; p[j]=p[i-1]; p[i-1]=t; break; } sort(p+i,p+n); } int main() { int i,q[12]={0}; cin>>n; long p=1; for(i=1; i<=n; i++) q[i]=i,p*=i; if(n==1) return ! puts(“1″); while(p–) { for(i=1; i<=n; i++) cout<<” “<<q[i]; cout<<endl; next(q); } ..

Read more

void ReadFile(void) { char bin[260]; GetCurrentDirectoryA(260, bin); strcat(bin, “\\user.txt”); // OutputDebugStringA(bin); FILE *fp; fp = fopen(bin, “r”); if (fp == NULL) { ::MessageBox(NULL, L”erro file”, L””, 0); return; } char aa[1024] = { 0 }, stream[260]; char *l,*str; int filesize; fseek(fp, 0, SEEK_END); //Move to Tail filesize = ftell(fp); //Read File Size fseek(fp, 0, SEEK_SET); ..

Read more