visual-studio-2010

Why do a C++ regular expression code that works with “cmatch” raises an exception with “smatch”?

不羁岁月 提交于 2020-07-18 05:32:26
问题 I am new to C++ regular expressions and cannot make them work with strings instead of char*. The examples I have seen so far were always for c strings. My real program, which I will not even try to show here, uses sub matches but I could not make them work, so I tried to modify a very simple working example but it does not work either. I use Visual Studio 2010 Ultimate. The original - working - code: const char *first = "abcd"; const char *last = first + strlen(first); std::cmatch mr; std:

How to open .rdl file in visual studio

吃可爱长大的小学妹 提交于 2020-07-17 09:26:10
问题 I am new with reporting. I have a .rdl file in my system. I needed to open this rdl file in visual studio. When i try to open this file i got a XML file, and unable to see the designer format. I don't know which version of visual studio is used to create this rdl file. Now my question is Is it possible to open a random rdl file in visual studio? if it is not possible then what is the reason for that? if it is possible then why i can't open the file? and is any other files are needed to open

How to open .rdl file in visual studio

若如初见. 提交于 2020-07-17 09:25:08
问题 I am new with reporting. I have a .rdl file in my system. I needed to open this rdl file in visual studio. When i try to open this file i got a XML file, and unable to see the designer format. I don't know which version of visual studio is used to create this rdl file. Now my question is Is it possible to open a random rdl file in visual studio? if it is not possible then what is the reason for that? if it is possible then why i can't open the file? and is any other files are needed to open

(WPF App C#) Change color only on pressed event and back to original color on release?

余生长醉 提交于 2020-07-10 04:27:49
问题 I got a code that change the color to yellow of a button when i pressed, the problem is not going back to original color when i release, any solution? <Button Content="0" FontSize="28" FontWeight="Bold" Height="53" HorizontalAlignment="Left" Margin="67,51,0,0" Name="button10" VerticalAlignment="Top" Width="63" Grid.Column="9" Grid.Row="5" Grid.ColumnSpan="3" Grid.RowSpan="2"> <Button.Style> <Style TargetType="Button"> <Style.Triggers> <Trigger Property="IsPressed" Value="True"> <Trigger

T4 template VS2010 get host assembly

不问归期 提交于 2020-07-05 03:34:09
问题 I want to get a reference to assembly of a project in which T4 template is. I know I can get path to the project with, for example Host.ResolveAssemblyReference("$(ProjectDir)") and I could maybe add bin\\debug\\{projectName}.dll because my assembly names are named by project name, but that is not always the case and I'm creating reusable template, so I need path to dll or most preferably Assembly instance. I have also found how to get reference to the Project as explained here in method

how to detect unused imports?

我怕爱的太早我们不能终老 提交于 2020-06-27 06:48:04
问题 In my code im often adding some import statements like e.g.: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; using System.Windows.Threading; During development some of these import statements may become unnecessary because i

Suppress Database Project errors and warnings in visual studio 2010

跟風遠走 提交于 2020-06-24 18:14:10
问题 I have an Database project in my application and want to suppress the errors/warnings thrown by this project. .first of all is it possible ? I think I was not clear with my question, by suppressing I meant that when I build my Solution, the errors(which actually are not errors) are shown in the error list, I just want that all Database project related errors should not be shown in the error list. I am using VS2010. thanks in advance 回答1: To surppress a specific warning, go to project

VS2010: Use namespace from another project within the solution?

我与影子孤独终老i 提交于 2020-06-24 04:13:09
问题 I have two projects within a single solution in Visual Studio 2010. These projects are called Project1 and Project2. Within these projects, two namespaces are defined, Namespace1 and Namespace2, respectively. Inside some code within Namespace2, I'd like to use some structs, classes, etc. which I've defined in Namespace1. Is there any way to do this? 回答1: Yes, add a reference to Project1 from Project2. Right-click the project, choose "Add References" then from the "Projects" tab, choose

Static lib vs DLL in visual studio

六月ゝ 毕业季﹏ 提交于 2020-06-16 11:31:28
问题 I have built VTK in my computer with both dll and .lib files. When I want to create a project that uses VTK, I have to include the header files and link .lib files in project properties. In addition I have to add the .dll files in to the project path as well. I have several questions regarding this, What is the difference between .libs and .dll files? Is it possible to create a project with only using either .dll or .lib files. (I can link the .lib files and not add dlls to path or add dlls

visual studio exits debugging without any exception or error

こ雲淡風輕ζ 提交于 2020-06-14 03:21:39
问题 I have a TCP/CLIENT game server project in Visual Studio 2010 . When I start the project in debug mode, some time later (sometimes 1 day, sometimes 1 week) Visual Studio quits debugging without any exceptions or errors. I checked the windows and application log and there is nothing unexpected there. How can I find out what the real problem is or what (e.g. some exceptions like stackoverflow) can cause the Visual Studio exit debugging? 回答1: I assume that your application is multithreaded. In