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
how to link boost filesystem on MacOS?
do you have boost installed
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....
Winkee
if that doesnt work then i dont know
well it works, but that is a bit cumbersome to link to static libraries.
...
Like this??
no, strcmp is a function not an operator.
Talula
Like this??
That is one bad camera.
Talula
Like this??
What in the world is "exam"?
...
@ff_0x1d3 can u plz help me inthis
use scanf to read stdin into a buffer, and compare those buffers to your strings
...
as previously mentioned, get familiar with the concept of an array, and use that
Re
What in the world is "exam"?
Just a variable name i used
Anonymous
Like this??
/warn screen photo
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
Why?
Read the rules
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?
olli
Screen photo is not allowed BUT can we send screenshots?
you shall use pastebin services to share code, it's easier to reproduce
Anonymous
Can anyone tell me the best websites for learning c programming?
Anonymous
Really? Voice messages in 12k group?
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)
Anonymous
Gcc
Puspam
Hi guys can anybody tell why I cant take input globally in a global variable (language c)
That's because global variables need to be constant and of predefined size.
Anonymous
Showing expected a type specifier
Puspam
I only declare a int size;
It also needs to be constant. Means, you cannot initialize at run-time.
Anonymous
thanks
Roxifλsz 🇱🇹
Roxifλsz 🇱🇹
Showing expected a type specifier
Sounds like you fucked up your syntax, show the code
Puspam
Anonymous
Sounds like you fucked up your syntax, show the code
Fixed that problem I fixed and code works
Neeraj
Which library are you using for the GUI ?
i dont kNow Anything about gui...i want help regarding lib also...
M.Khorram
i dont kNow Anything about gui...i want help regarding lib also...
I'm not sure about what you want to do, but Qt framework (GPL and LGPL) might be what you are looking for. Also, Gtk and Wxwidgets are available and could be used for your project
Neeraj
this is what i want...😅
Pavel
gtk is nice and easy
Pavel
Kinda easier than qt
Nameful
Anonymous
does g++ have the equal operator on matrices ? i mean vector < vector < bool > > ?
Anonymous
/warn
M.Khorram
does g++ have the equal operator on matrices ? i mean vector < vector < bool > > ?
No, You can use either Eigen or Armadillo libraries for matrix and vector (mathematics).
Igor🇺🇦
does g++ have the equal operator on matrices ? i mean vector < vector < bool > > ?
It's not related to g++. It's general for C++ vector. It has compare operators so if internal elements have operator== is should work.