Anonymous
U can use any number
Anonymous
* Ur input string + 1
Anonymous
is there an algorithm for multi-view selection?
specifically for keeping track of the current selected view, and selecting new views
for example (in psuedo-code)
if false is returned, the current view will process input, otherwise the current view will not process input
in view X
if currentView is not null
childHasBeenBroughtToFront = false
for i in childCount
child[i].broughtToFront = false
else
endif
return false // view X will process input
in children
if broughtToFront
return false // this view will process input
parent = getParent
if parent is X
if X.childHasBeenBroughtToFront
return true // this view will not process input
bringToFront()
broughtToFront = true
X.childHasBeenBroughtToFront = true
X.currentTop = this
return false // this view will process input
else throw invalid parent
Anonymous
specifically how would i go about handling the case where
in view X
view A is the current top
and the user selects view B, which should now become the current top
Winkee
how to link boost filesystem on MacOS?
Anonymous
Winkee
Winkee
yes I have
Anonymous
try using the full path
Winkee
sorry? what is full path
Anonymous
the full path to the file
Anonymous
eg /usr/lib/libboost_filesystem.a
Winkee
cmake_minimum_required(VERSION 3.16)
project(first)
find_package (boost COMPONENTS system filesystem REQUIRED)
add_executable(first main.cpp)
if (FILESYSTEM_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
target_link_libraries (first ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_LIBRARIES})
endif (FILESYSTEM_FOUND)
Winkee
this is my CMakeLists.txt, any problem?
Winkee
Undefined symbols errors
Winkee
like g++ main.cpp -l/usr/lib/libboost_filesystem.a?
Winkee
ld: library not found for -l/usr/local/lib/libboost_filesystem-clang-darwin100-mt-x64-1_72.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Winkee
g++ ../main.cpp -llibboost_system-clang-darwin100-mt-x64-1_72 -llibboost_filesystem-clang-darwin100-mt-x64-1_72
Winkee
also not work
Anonymous
try g++ main.cpp /usr/lib/libboost_filesystem.a?
Anonymous
if that doesnt work then i dont know
Winkee
I tried, not work
Anonymous
:(
Anonymous
if I have a variable that needs to be const (uni asignment) is there any way to change the value of the said variable more elegant than
int buffer = variable;
buffer = somefunction(buffer);
?
Anonymous
since const variables cannot be changed....
Re
...
no, strcmp is a function not an operator.
Talula
Re
Talula
What in the world is "exam"?
...
as previously mentioned, get familiar with the concept of an array, and use that
Re
Re
Anonymous
Anonymous
There aren't many practical situations where you can use the latter
Anonymous
No?
Anonymous
Obviously. Just the types are different.
Anonymous
To access the array elements use *(*ptr + i) or (*ptr)[i]
Ammar
Let say there is an array declaration like this:
int array[5];
array and &array both have the same "value".
They point to the first element of the array.
However, they are semantically different.
This means, when you apply arithmetics operation to them, the result will be different.
(array + n) has scale factor of sizeof(int)
((&array) + n) has scale factor of sizeof(int [5])
Ammar
C treat it based on its type.
For example:
char is 1 byte length.
int is 4 bytes length.
#include <stdio.h>
int main() {
{
char *x = (char *)0;
printf("%p\n",x+1); // will be 1
printf("%p\n",x+2); // will be 2
printf("%p\n",x+3); // will be 3
}
{
int *x = (int *)0;
printf("%p\n",x+1); // will be 4
printf("%p\n",x+2); // will be 8
printf("%p\n",x+3); // will be 12 (0xc)
}
}
Re
Why?
Talula
Why?
Using Camera or Screen shot.
Anonymous
Ammar
I am trying to visualize the above question.
Ammar
https://godbolt.org/z/8vx68h
Harry
Screen photo is not allowed BUT can we send screenshots?
Anonymous
Can anyone tell me the best websites for learning c programming?
Dima
Anonymous
Really? Voice messages in 12k group?
Tohirjon
Neeraj
Hi Guys If anyone can help plz Help me...
I have create a program in C Language that takes input and display a particular result. And I have to create a Gui button
But now i have to add a button to it. So that whenever i click on the button, The result will be displayed and copied to clipboard .
Anonymous
Hi guys can anybody tell why I cant take input globally in a global variable (language c)
Puspam
Anonymous
Gcc
Puspam
Anonymous
Showing expected a type specifier
Anonymous
Anonymous
thanks
Roxifλsz 🇱🇹
Puspam
Anonymous
Neeraj
Neeraj
this is what i want...😅
Vlad
Pavel
gtk is nice and easy
Pavel
Kinda easier than qt
Nameful
Anonymous
Ammar
Anonymous
does g++ have the equal operator on matrices ? i mean
vector < vector < bool > > ?
Anonymous
/warn
M.Khorram