I am using visual studio 2008 professional and during compilation, the errors and warnings are all displayed together, making it hard to identify the error messages. How do I remove the compile warnings during compilation? And in Visual studio 2005, the warnings and errors have their separate tabs and are nicely separated. Why did microsoft remove this user friendly display and mix both errors and warnings in VS2008.........:confused:
KaKa
Posts
-
How to remove compile warnings in VC++ 2008? -
What is the difference between these 2 ways of declaring an object?Thanks alot Jijo......that explains alot :) For the second code snippet with the class forward declaration, does this method work if the forward declared class file is located in another directory?
-
What is the difference between these 2 ways of declaring an object?While I was reading some C++ code, I saw a code snippet which declared an object like this:
#include <string>
#include <cassert>
#include "BaseGameEntity.h"
#include "Locations.h"class State;
class Miner : public BaseGameEntity
{
private:State\* m\_pCurrentState; .....
};
Another way of declaring an object is to include the header file and then declare the object in the class:
#include <string>
#include <cassert>
#include "BaseGameEntity.h"
#include "Locations.h"
#include "State.h"class Miner : public BaseGameEntity
{
private:State m\_pCurrentState; .....
};
Yes, in the first code snippet, an object pointer is declared while in the second one, it is a normal object. Other than that,is there difference between these 2 ways of declaring an object? When should either method be used? :confused:
-
How to make a bitmap image cover part of a picturebox control?I created a bitmap object and used it to draw a 2D terrain programatically on a form. Then I also added a picturebox control to display an image near the terrain. However, the picturebox control is blocking out part of the bitmap. How do I make the bitmap "cover" part of the picturebox control instead? Is there a "layers" method which the form can use to draw one bitmap over another control? Edit/Delete Message
-
Unable to set location of picturebox programaticallyYup, I guess you are right. When I added the control to the form, it can work now. Thanks~ :)
-
Unable to set location of picturebox programaticallyI have a picturebox which was created programatically and its location should be determined when the form loads. I set the location property to a point but no matter what point is set, the picturebox appears on a fixed location when the form loads. Below is the code:
In the picture class: public PictureBox PlaceFlower() { PictureBox flower = new PictureBox(); flower.Height = 80; flower.Width = 80; flower.Image = Image.FromFile("C:\\grass.bmp"); return flower; } public Point SetCoordinates() { int x = randomClass.Next(10,50); int y = randomClass.Netxt(10,50); Point p = new Point(x, y); return p; } In the form class: private PictureBox flowerPicture; private void Form1_Load(object sender, EventArgs e) { flowerPicture = picture.PlaceFlower(); flowerPicture.Location = picture.SetCoordinates(); }
I've checked the values of the point coordinates and they vary each time the form loads but somehow the picturebox always remain fixed at the same point on the form. I have made sure that the locked property of the control is set to false. What is the problem with the picturebox location? :( -
How to apply a texture to an irregular shape using GDI+ ?I have an algorithm which generates random 2D terrain shapes which are similar to those seen in the "Worms" game landscapes. With such random shapes, how do I apply a texture to such random "curvy" shapes? The GDI+ texture examples I've seen apply to regular shapes like rectangles but didnt cover how to apply textures to irregular shapes.
-
A question about the sleep() functionWhile the sleep() function is executed, can another method in the same program run? If not, how can I make 1 method run while the other is delayed?
-
Errors using windows.hI am using VC++ 2005 standard edition and tried using #include in my project but there are a list of errors with the description: "error C2872: 'IUnknown' : ambiguous symbol C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\unknwn.h " I found that the windows.h file is in the C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK directory. The project has also included the $(VCInstallDir)\PlatformSDK\lib, \include and \bin lines in the project options window. How to include windows.h correctly?
-
Unable to connect to PUBS databasewhat is the database extension supposed to be? I downloaded it from the microsoft website and it states that these databases are for sql server 2000.
-
Unable to connect to PUBS databaseWhenever I try to connect to the PUBS.MDF database, a login failed error message will appear. I defined the connection string in the web.config file under the connectionstrings section like this: [code] add name="Pubs" connectionString="Data Source = localhost\SQLEXPRESS; Initial Catalog=Pubs;Integrated Security=SSPI" [/code] And setup the connection in the click event of a button: [code] Dim connectionString As String = WebConfigurationManager.ConnectionStrings("Pubs").ConnectionString Dim myConnection As New SqlConnection(connectionString) myConnection.Open() .......... [/code] And I put the PUBS.MDF file in the same folder as the vb source files. How do I connect to the database correctly?
-
Is this game development diploma worth a try?I've attended a game development course preview. The course offers a diploma for game development and the attractive thing is that it offers testimonials and direct job offers or freelance opportunities for students who make the grade. Also, enrolled students are assigned to be paid game testers. The software used for this course are: DarkBasic, GameMaker, Visual C++, Maya, 3D Max and the school's own game engine. Is this course worth a try? And is DarkBasic useful in the game industry? I live in Singapore and the name of the school is "Asian Centre for Professional Excellence".
-
How to access IIS's aspnet_regiis utility?I have checked but there is no "Framework" folder inside the Microsoft.Net folder. Its strange as i have no problems using VStudio 2005.
-
How to access IIS's aspnet_regiis utility?I have installed the .Net framework before installing IIS. Is there a way to use this utility? :(
-
How to access IIS's aspnet_regiis utility?I just installed IIS 5.0 and want to use the aspnet_regiis.exe command utility to register ASP.Net file mappings with IIS. According to the asp.net book I have, the directory of the utility is: C:\Program Files\Microsoft.NET\Framework\[Version]\aspnet_regiis.exe -i However, when I checked the directory, there is no Framework folder inside the Microsoft.NET folder. How do I access this utility?
-
Where to declare global variables?I have a C++ project with multiple .h and .cpp files and with a .cpp file containing the int main() function. Where do I declare global variables such that they can be accessed by the methods in the various .cpp files? I declared the variable before the main() function but there is an "undeclared variable" error. I tried creating a .h file to store the global variable and added the line: #include "globals.h" in the necessary .h files but there were all sorts of link errors.
-
Custom error page unable to be displayedI have created a custom error web page which is supposed to be displayed when the user tries to access an invalid page but instead of the custom error page appearing, the standard "Server Error in 'Error handling' application. The resource cannot be found" asp.net error page appeared instead. I edited the web.config file like this: customErrors mode="Off" defaultRedirect="PageNotFound.aspx" error statusCode="403" redirect="PageNotFound.aspx"/ error statusCode="404" redirect="PageNotFound.aspx"/ *I removed the tags because it seems that text within tags cant be displayed The custom page's name is PageNotFound.aspx. The default address of the website is: http://localhost:1351/Error handling When I tried to access a non existant web page like: http://localhost:1351/Error handling/lucky.aspx , only the standard error page appeared instead of the custom error page. How do I make the custom error page appear?:((
-
How to initialize a 2D array correctly? :confused:Hello, How do I initialize a global 2D array in C++? First, I declared the 2D array outside of the main function. int data[32][5]; Then in the main function, I initialized the array: data[32][5] = {{0,0,0,0,0}, {0,0,0,0,1},{0,0,0,1,0},{0,0,0,1,1},{0,0,1,0,0},{0,0,1,0,1}, {0,0,1,1,0}, ......................(rest of the integers here).......... .................................................................................. {1,1,1,1,1}}; The above is what I typed into visual c++ 2005. After the comma of the first bracket and every 5th bracket, I pressed 'Enter' to go to a new line. However, when I compiled, there were syntax errors saying that there are missing ; before '{' or '}' . What is the syntax error? :)
-
Can Dynamic 2D arrays solve stack overflow problem?Hi, I wrote a piece of code which initially uses a 128 by 47 2D array. It works fine. But when I changed it to 1600 rows by 47 columns, the program starts to crash. The error message said that a stack overflow has occured. I would like to know if dynamic 2D arrays solve this problem? There are also some 1D arrays with the size of 1600. Do they have to be converted to dynamic arrays too?
-
Why does the program crash when it enters a function?Hi,thanks all for the replies. I think it could be a stack overflow because previously the 2D array was 128 rows by 46 columns but when I expanded it to 1600 rows, the program crashed. So, if the the function parameters are replaced by pointers instead of arrays, will the crash problem be solved? I call the rank function using this: rank(n,d,distance,r); where n is the integer variable, d is the 2D array while distance and r are the 1D arrays.