visual-studio-2010

Include referenced project's .config file

守給你的承諾、 提交于 2019-12-31 08:57:49
问题 Rather than excluding a file from the referenced output of an assembly, I want to add one! I have a console application project (BuildTest1) that references a second class library project (ClassLibrary1). The Visual Studio solution looks like this: I have a class library project that has an app.config. I want this .config file copied to the referring project's output, just like the .dll and .pdb files are. The config file for the class library is copied to the class library output directory

gotoxy() function is not working in Visual Studio

你。 提交于 2019-12-31 07:12:10
问题 I'm not able to use gotoxy() function in Visual Studio 2010. Is there any alternative for that? 回答1: Are you talking about command line applications or windows applications? You must remember that VC2008 is a windows specific development environment, so if you were learning programming on a linux/unix or an older dos system then things will not be the same. The only way I know of under windows to change the position of the cursor in a console application is to use the windows function

thrust::device_vector in CUDA [duplicate]

雨燕双飞 提交于 2019-12-31 07:09:46
问题 This question already has answers here : Thrust inside user written kernels (4 answers) Closed 2 years ago . i am new to CUDA and is trying to learn the usage. can someone please help. i have the following in the main function (i am in visual studio and my source and header files are .cu and .cuh respectively) thrust::device_vector<float> d_vec(100); kernel<<<100,1>>>(d_vec); and then in the kernel i have template <typename T> __global__ kernel(thrust::device_vector<T> d_vec) { int tid =

Separating Chart Series

主宰稳场 提交于 2019-12-31 07:06:26
问题 I currently have a chart element that has 4 Series. My problem is that while they work individually, if I set more than 1 Series it sets the data for all of them to the last DataSet (So Series 1,2 & 3 have the same positions as 4). Could someone have a look at my broken code and let me know where it's all going wrong? And maybe some pointers on neatening it up... I have never worked with any form of charts before. Using con = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C

(How) does debugging change the workflow of the program?

妖精的绣舞 提交于 2019-12-31 05:39:28
问题 Consider the following simple program: var dblMax = Double.MaxValue; var result = (dblMax * 1000) / 1800; Console.WriteLine(result); When I build this in Debug mode and run (Ctrl+F5) or debug (F5) it, it prints 9.987140856842E+307 . When I switch to Release mode and run (Ctrl+F5) it, it prints 8 for infinity. I understand that this difference is due to some compiler optimization which is done in Release mode. However, if I debug (F5) the same build in Release mode, it prints 9.987140856842E

Improper de-allocation of memory?

六月ゝ 毕业季﹏ 提交于 2019-12-31 05:35:53
问题 When testing my code, I consistently get errors regarding the use of delete as my class's testbed states that delete is being called on an array allocated with new[]. I have delete in my ~IntVector and two expand functions with the expand functions expanding the capacity while reallocating memory for a dynamically allocated array. How do I use delete correctly to prevent memory leaks and resolve this error? main file #include "IntVector.h" #include <iostream> #include <vector> using namespace

How can i programmatically add a Tab to a form during runtime?

若如初见. 提交于 2019-12-31 05:31:05
问题 I googled this and still cant get it to work. I know how to add a tab using the toolbox. I have also read about how to do it programmatically, but i still dont get it. (MSVC# Express 2010) I have an easy project set up. Just a windows Form with a TabControl in it, i used the Designer to add a new TabControl and made that TabControl public instead of private. I wrote this code to a) access the Windows Form b) add a tabpage. The code compiles just fine, but the Tabpage is not displayed during

zmq.hpp fails assertion when attempting to debug

风格不统一 提交于 2019-12-31 05:29:28
问题 Its been a while since I worked with c++ in visual studio, and due to this I can't tell when I am doing wrong when attempting to run a debug instance of zmq's hello world client. After installing zmq 4.0.3 and downloading the zmq.hpp master branch from github I copy/pasted the hello world client from the zmq guide. Using Visual Studio 2010 I navigated to the project properties and have included both the include folder containing zmq.h and the folder including zmq.hpp I also included the lib

How linker solves ambiguities when linking *.libs?

爱⌒轻易说出口 提交于 2019-12-31 05:29:28
问题 after very long long time spent with unresolved externals I found that VS2010 was linking wrong .lib file. Files were unfortunately named with same name. Folder with linked(unwanted) lib was set in project properties Folder with unlinked(wanted) lib was inherited from other property sheet Desired lib was newer date, undesired was very older. Linker chose the unwanted one (as above). What are the rules for linking libs? Shouldn't linker give at least warning on some ambiguity? edit: symbol is

how to add title for every header column in gridview in ASP.NET

梦想与她 提交于 2019-12-31 04:37:07
问题 i'm using ASP.NET , i have a gridview and i need to put a title in every header column , title will show on moseover ................................. do i have to convert the field to TemplateField some thing like this : <asp:BoundField DataField="ID_Dossier" HeaderText="ID_Dossier" ReadOnly="True" SortExpression="ID_Dossier" title="Trier par identifiant des dossiers " /> this is my gridbiew : <asp:GridView ID="DossierGV" runat="server" AllowPaging="True" AllowSorting="True" DataSourceID=