visual-c++

How to sort multiple arrays based on one and print them out

ⅰ亾dé卋堺 提交于 2021-02-11 13:23:31
问题 I used a string-stream to read an input file with 10 lines and stored all the values into separate arrays. ID, first, last, city, state, and GPA. It looked like this. 1 Nathan Humphery Kansas MO 3.35 2 Sara Jonathan LeesSummit MO 3.56 3 Kayla James Liberty KS 3.78 4 Kyle Davis Independence KS 2.98 ... 8 Daniel Earla Independence KS 3.77 So the ID array would be { 1, 2, 3, 4, ..., 8} and the city array would be {Kansas, LeesSummit, Liberty, Independence, ..., Independence} One of the functions

Splitting Child Window in MFC MDI Program

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-11 12:20:32
问题 I am trying to split the Child Window of an MFC MDI progarm that I am working on but am having some problems. I know I have to use the CSplitterWnd class and have been trying to follow the instructions on the post here: Create multi views in a CChildFrame using CSplitterWnd but can't seem to get it to work, would anyone be able to offer me some advice with regard to these instructions, I have some specific questions: Is CRightView also a CView derived class and what code should go in there if

Using GetOpenFileName in Dev C++, VS

旧街凉风 提交于 2021-02-11 05:12:23
问题 I am fairly new to programming and compilers. I had a 1 year C++ class in university. Last month I started a project where I wanted to automate some processes for work. The program takes a phone directory and then creates .cfg files from it. Nothing very advanced, mostly reading, storing and writing data. I made my project using Dev C++ IDE. It works fine and it is simple to use for a beginner like me. Lately I was trying to use a Visual C++ function called GetOpenFileName. I got an example

Using GetOpenFileName in Dev C++, VS

。_饼干妹妹 提交于 2021-02-11 05:10:23
问题 I am fairly new to programming and compilers. I had a 1 year C++ class in university. Last month I started a project where I wanted to automate some processes for work. The program takes a phone directory and then creates .cfg files from it. Nothing very advanced, mostly reading, storing and writing data. I made my project using Dev C++ IDE. It works fine and it is simple to use for a beginner like me. Lately I was trying to use a Visual C++ function called GetOpenFileName. I got an example

Using GetOpenFileName in Dev C++, VS

☆樱花仙子☆ 提交于 2021-02-11 05:06:13
问题 I am fairly new to programming and compilers. I had a 1 year C++ class in university. Last month I started a project where I wanted to automate some processes for work. The program takes a phone directory and then creates .cfg files from it. Nothing very advanced, mostly reading, storing and writing data. I made my project using Dev C++ IDE. It works fine and it is simple to use for a beginner like me. Lately I was trying to use a Visual C++ function called GetOpenFileName. I got an example

How to initialize test variables using Visual Studio CppUnitTestFramework

痞子三分冷 提交于 2021-02-10 17:54:47
问题 I'm writing a roboter controller class Controller in which I'm using a struct Axis for each of the 4 controllable motors. For each test I want to reset everything, so I created a pointer in the class which is changed to a new Controller before each test method. The initialisation works fine in TEST_METHOD_INITIALIZE, but once any TEST_METHOD is called the program seems reset the Axis pointers. Thanks for your help! Edit: After further analysis I have the theory, that the initialised Axis

How to initialize test variables using Visual Studio CppUnitTestFramework

别说谁变了你拦得住时间么 提交于 2021-02-10 17:53:13
问题 I'm writing a roboter controller class Controller in which I'm using a struct Axis for each of the 4 controllable motors. For each test I want to reset everything, so I created a pointer in the class which is changed to a new Controller before each test method. The initialisation works fine in TEST_METHOD_INITIALIZE, but once any TEST_METHOD is called the program seems reset the Axis pointers. Thanks for your help! Edit: After further analysis I have the theory, that the initialised Axis

BOOL redefinition after including minwindef.h

狂风中的少年 提交于 2021-02-10 15:45:01
问题 I am a newbie in C/C++, just in case :) I have cloned an older protocol stack solution written in C with one main class in C++ imported it into VS ( Visual C++ 2017 v 15.9.5 targeting Windows SDK 10.0.17134.0 ) it compiled correctly and working. Now made a C++ solution (windows console application) created a folder lib copy pasted all those .h and .c files into lib added the path to additional include directories and also in linker additional library directories . Building the Solution

Getting MIDL 2003 Redefinition errors

偶尔善良 提交于 2021-02-10 15:39:43
问题 I have a very simple program that I am trying to compile before I build it out any further. I am trying to learn COM so following along here, I create app.h and app.cpp file in VS 2017 and using the ATL Template. When I try to build the solution I get a lot of MIDL 200 redefinition errors. UPDATE (Based on @Roman R.'s response) Note that if I used cl /LD app.cpp on a Dev Command Line, I am able to generate app.dll correctly. The MIDL 2003 redefinition errors show up only when trying to build

Getting MIDL 2003 Redefinition errors

风流意气都作罢 提交于 2021-02-10 15:39:14
问题 I have a very simple program that I am trying to compile before I build it out any further. I am trying to learn COM so following along here, I create app.h and app.cpp file in VS 2017 and using the ATL Template. When I try to build the solution I get a lot of MIDL 200 redefinition errors. UPDATE (Based on @Roman R.'s response) Note that if I used cl /LD app.cpp on a Dev Command Line, I am able to generate app.dll correctly. The MIDL 2003 redefinition errors show up only when trying to build