c tag

1304 questions


1 answers
69 views
0
What does static block mean in Java?

static { ...}I saw this code. I don't know what this is at all, and it doesn't make errors and compiles well.What does the 'static' block mean?

2 years ago

1 answers
101 views
0
What is the fastest way to find out the existence of a file in C/C++11/C?

Is there a standard for C++11/C++/C to find out if a file exists or not?I want to check if the file exists before I open it.What should I do to make an annotation part from the code below?inline bool ...

2 years ago

1 answers
100 views
0
I'm C Newbie. Please tell me how to use a function pointer

Why is the pointer so hard?It's hard to use a normal pointer. A function pointer?How do I turn over the factor?Please tell me how to use it, not too difficult ㅜ

2 years ago

2 answers
64 views
0
What type is size_t exactly?

I know that sizeof() returnsWhat else is there?Is it a data type?for(i = 0; i < some_size; i++)When writing these repetitive statements, i is int? size_t? Which one should I write?

2 years ago

1 answers
147 views
0
What is the difference between "chars[]" and "char*s"?

In C, when saving a string,There are two ways together. What's the difference between these two?I want to know what actually happens on memory when I compile, when I run.

2 years ago

1 answers
34 views
0
How do I write strings across lines in C/objective-C?

const char *sql_query = SELECT statuses.word_id FROM lang1_words, statuses WHERE statuses.word_id = lang1_words.word_id ORDER BY lang1_words.word ASC;Very long queries together const char *sql_query =...

2 years ago

1 answers
148 views
0
To initialize a C array

I want to initialize the same value from beginning to end when declaring an array.Now int myarr[30];for(i=0; i<30; i++) myarr[i] = 3;I'm doing a for statement like this, but not memset()myarr[all] ...


1 answers
113 views
0
GCC does not optimize a*a*a*a*a*a to (a*a*a)*(a*a*a).

As far as I know, the compiler optimizes power(a,2) to a*apow(a,6) does not optimize, but calls the library function pow().The C++ Intel Compiler optimizes you to 6Why does the GCC C compiler optimize...


1 answers
185 views
0
To declare and initialize ANSI Structure separately?

How can I declare and initialize the structure in a different place?For example, in this code,typedef struct MY_TYPE { boolean flag; short int value; double stuff;} } MY_TYPE;void function(void) { MY_...

2 years ago

1 answers
102 views
0
What does the constant 0.0039215689 do in the graphic header?

0.0039215689 is used a lot in the graphic header fileWhat's the point?Why do you always write 0.0039215689 without setting it to const?If you look at the first code on Google (here )void RDP_G_SETFOGC...

« - 59 - »

© 2024 OneMinuteCode. All rights reserved.