An
Is the built-in windows.h capable of making great GUI's?
An
What are the convenient alternatives?
Danya🔥
What are the convenient alternatives?
You need native Windows UI?
An
You need native Windows UI?
I need a library in which I can make (really fast) text highlighting in the text input widget.
Mohsen
I need a library in which I can make (really fast) text highlighting in the text input widget.
You can use Visual Studio 's Visual C++ option, it's so powerful
Mohsen
Which module do you mean MFC???
There are a lot of options, All of them work fine
Ludovic 'Archivist'
-
Hi. I wanna scanf multiple strings by using 2D arrays but I don't know the length of every string .So when I define sth like : char array [row][colomn] scanf("%s",&array[row][ ]) what should i put inside the second straight bracet ?
Pavel
Hi. I wanna scanf multiple strings by using 2D arrays but I don't know the length of every string .So when I define sth like : char array [row][colomn] scanf("%s",&array[row][ ]) what should i put inside the second straight bracet ?
I guess you want something like this? scanf("%s", array[current_row_idx]);? Note that scanning without specifying the limit (e.g. %20s) can result in UB and is a very common vulnerability.
klimi
Inconnu sent a code, it has been re-uploaded as a file
this has the negative effect of buffer overflow though
-
I guess you want something like this? scanf("%s", array[current_row_idx]);? Note that scanning without specifying the limit (e.g. %20s) can result in UB and is a very common vulnerability.
yeah but how can we ignore the second [ ]while scannig the string? I mean how does the compiler understand the [current_row_idx] is related to rows?
Pavel
yeah but how can we ignore the second [ ]while scannig the string? I mean how does the compiler understand the [current_row_idx] is related to rows?
For scanf it doesn't matter what is in the memory. You pass a pointer to it, it overrides the memory with the string. When you have an array of char, you can pass the array and it will decay into a pointer to the first element of the array. For multidimensional arrays (arrays of arrays) it is very similar. int a[10][20]; a[5] - returns the 6th array of 20 elements, which can be decayed to int*. a[5][3] returns 4th element from that array
(-__-)
#include <iostream> using namespace std; int main() { char count = 'A'; char * pCount = &count; cout << pCount; return 0; }
Anonymous
Hi everyone, Why this code does not print the address of the count variable ?
here is a discussion: https://cplusplus.com/forum/general/59834/
-
Hello guys, Is it worth learning C++ from his videos Bro Code
Rocky
Anyone here know about Android studio ?
Marc
Hello guys, Is it worth learning C++ from his videos Bro Code
As long as you learn and familiarize some information, why not? It's indeed worth to watch, if so.
-
hi there's a string of numbers which are made of both ints and floats and I should find the max number between them but how could i compare them when i don't know whether it's a float or an int? because I wan to use functions like atof
M
is it possible to have modern-looking desktop apps in C? if yes, what are your suggestions?
M
It's not impossible, it's irrational
Seems no way for me but starting c++.
Persia
Hi who can get udemy lessons for me?
Persia
U do?
klimi
Hi who can get udemy lessons for me?
I thought you just go to udemy and open a course?
-
I have garbage values for integer in the file I wrote in, any help?
p
Hi guys I am going to start web development with html css javascript  from the beginning. So if anybody here is the same at my position and wants to learn together dm me. The benefit will be: 1. We can do discussion on a daily basis it will create more clarity. 2. We can ask small doubt very easily which will save our time. 3. Up and down of mood is normal during this path so we can motivate each other. 4. We can make a better experience of learning.
M
Gtk?
Ain't that a bit legacy?
klimi
Ain't that a bit legacy?
Gtk legacy? What superseded it?
M
Gtk legacy? What superseded it?
I'm sorry I don't know much in this context, but as searched the look of the programs Developed by, it is not much attractive in pov of client. I'll be thankful if you correct me if I'm wrong.
Majid
Hello, don't be bored, sorry, I had a question, can I add the opencv library to mingw so that I can run it in the sublime text environment?
Mohsen
I have a problem with my code Explanation: I need to get an string from input, and save it's length to another array. And this all happens in a for loop. This is my code: string input[numof_lines]; string length[numof_lines]; for (int i = 0; i < numof_lines; i++) { cin >> input[i]; length[i] = input[i].size(); } when I enter "yes" as input, and try to read the array with same index, it outputs "♥️" and whenever I type anything else, it saves other random chars from Unicode How to fix issue?
Anonymous
What standard of C++ do you recommend for a newbie? And a big difference between them?
Chat Boss
Unreal - Maker sent a code, it has been re-uploaded as a file
Unreal - Maker
Enter a -> 1 Enter b -> -2 Enter c -> 0.5 f(x) = 1.000000 * x^2 - 2.000000 * x + 0.500000 Function is neither even nor odd: f(x) = -0.500000 != f(-x) = 3.500000 != -f(x) = 0.500000 Vertex (1.000000 , -0.500000) is a minimum
𝗝𝗼𝘆
I need help on this asap, at least can someone explain why that happens
You mean after more than 5 hours you couldn't figure out that simple error?
𝗝𝗼𝘆
What was it?
You declared length as array of strings but somehow in your loop you assigned an element with a different data type 😨
Chat Boss
sabin sent a code, it has been re-uploaded as a file
Sabin
sabin sent a code, it has been re-uploaded as a file
This code to delete records from the file is not working. Please help me😿
Anonymous
help me optimize the code
Why do you want to optimize it? Did youd profile it and notice any slowdown anywhere?
Anonymous
This code to delete records from the file is not working. Please help me😿
Because you are writing the record into the copy irrespective of whether the id is found or not. Check the else part of the if condition. You shouldn't be writing the record in this case.
-
How can I put validation of set function, that receives integer to check the first and second and third number must be specific number?
Pavel
How can I put validation of set function, that receives integer to check the first and second and third number must be specific number?
Not sure if I understand the question, you mean you call a function N times and want to check that the first three calls were done with a specific number?
-
I will get the number from user, it must be begin with 966, how can i do the condition?
Chat Boss
sabin sent a code, it has been re-uploaded as a file
Sabin
but its not working
Kandha
learn C from basic
Danya🔥
learn C from basic
It's not Google
Kandha
Noted thank you
klimi
Hoonigen🥀
learn C from basic
What that mean
cppreference.com said only non-exported const is internal linkage
Oh I find a similar question here: https://stackoverflow.com/questions/67558190/how-do-i-define-an-exported-constant