char tag

19 questions


1 answers
184 views
0
Why do I use char[] instead of string when I use password?

When you say getText() in Swing, the return value is String If you look at the return value of the password field getPassword, it's char[].If you look at that, String has security issues or uses it mo...


1 answers
165 views
0
What is the best way to put a char array in the string?

char[] a = {'h', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd'};There's a string like this String b = new String(a);Is there a better way than this?

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

2 answers
82 views
0
This is a c++ char generator initialization question

#include<iostream>using namespace std;class Test{ private: char* str; public: Test(char* name){ str=name; } void hello(void){ cout << str; }};int main(){ Test ptr(lee); ptr.hello(); ...


1 answers
123 views
0
Const char* data storage structure

const char* name = string;cout << &name;cout << static_cast<const void*(&*name);Here, the address of the pointer name changes every time you run it The address that the name poi...

2 years ago

1 answers
131 views
0
the difference between java char and char[]

I heard that there is also a difference between char and char [] in Java, is that true?

2 years ago

1 answers
95 views
0
Is there any way to prevent "deferred conversion from string constant to 'char*'" from appearing on GCC?

I recently upgraded to gcc4.3, and the following warning appears after that.I think this happened by writing char* where you need to write const char*. My code is really long. (Almost 500 files)Cannot...


1 answers
70 views
0
What if I don't know the length of the string to be entered in c/c++?

When you say that an input is always entered as a stringI don't know the length of the string to be enteredI need to determine the size of the char array, what should I do?If the size is input first, ...

2 years ago

1 answers
138 views
0
About getchar() function / scanf() function

int main(void) { int evil1, evil2; char ch;do { printf(Enter a pair of integers:\n); scanf(%d %d, &evil1, &evil2); printf(The lesser of %d and %d is %d.\n, evil1, evil2, (evil1 < evil2) ? e...

2 years ago

1 answers
70 views
0
Arduino uint8_t sensor value char array storage

void scan_rows(uint8_t *rows){ char A[65]; int i; uint8_t z,u,b; Serial.print(); for(z=0; z<8; z++){ if(z) { pinMode(z+29,INPUT); } pinMode(z+30,OUTPUT); digitalWrite(z+30,LOW); for(u=22; u<=29;...

2 years ago
- 1 - »

© 2024 OneMinuteCode. All rights reserved.