發表文章

目前顯示的是 2月 5, 2019的文章

File browser in the console using Visual C++

圖片
0 I have to make a kind of a file browser as a Windows console application with Visual C++. What libraries and functions should I use? I don't know how to start. c++ windows visual-studio visual-c++ windows-console share | improve this question edited Nov 14 '18 at 5:08 eryksun 23.4k 2 52 68 asked Nov 14 '18 at 4:01 AndreiC AndreiC 6 You will find that stack overflow is a terrible place to start your research. It is much better suited to detailing or filling holes in research. That said, start by listing directories. If your copy of visual studio is really up to date you may have access to the <filesystem> library (formally added to C++ in late 2017). If not, FindFirstFileW and FindNextFileW 1/2 – user4581301 Nov 14 '18 at 5:28 2/2 are likely your friends. Note I've linked to the wide character versions. It's 2018 and no one should be learning with the ANSI versions. – us

SQLite query - filter name where each associated id is contained within a set of ids

圖片
0 I'm trying to work out a query that will find me all of the distinct Names whose LocationIDs are in a given set of ids. The catch is if any of the LocationIDs associated with a distinct Name are not in the set, then the Name should not be in the results. Say I have the following table: ID | LocationID | ... | Name ----------------------------- 1 | 1 | ... | A 2 | 1 | ... | B 3 | 2 | ... | B I'm needing a query similar to SELECT DISTINCT Name FROM table WHERE LocationID IN (1, 2); The problem with the above is it's just checking if the LocationID is 1 OR 2, this would return the following: A B But what I need it to return is B Since B is the only Name where both of its LocationIDs are in the set (1, 2) sql sqlite select share | improve this question asked Nov 14 '18 at 0:41 Programmer001 Programmer001 540 6 23 add a comment  |  0 I'm trying to work out a query that will find me all of the dis