948 Posted Topics
Re: I personally, would read in each criminal as a whole entity. Check if the Criminal has a crime type of "Theft" and if so, save this in a vector or list. Once you've iterated through the entire file, return the list to the calling method. So some pseudocode [code] ... … | |
Re: Will there only ever be one part per line or multiple? eg. [icode]abcd|efg|hij[/icode] or [icode]abc|def|ghi|jkl|mno[/icode] If it's the first one, simply way is to do [icode]String.Split("|")[/icode] and only convert [0] and [2] of the array. If it's the latter, you will need to do some calculations using [iCODE]String.FirstIndexOf("|")[/iCODE] to find … | |
Re: I dispute the legitimacy of this request. Why would you want to remote install software over the LAN when you can simply remote desktop into any machine you own and install it yourself? Seems to me like you want to be a cracker. =/ | |
Re: Well to start with, I have to assume you're readin in bytes of the file. A byte is a number from -128 to 127, bytes in files tend to be unsigned, so 0 to 255. I imagine these are the numbers you're seeing. You then have to convert these bytes, … | |
Re: It's not really a simple solution. Follow the SDL documentation. It has step by step instructions on how to start a project. A game engine is a large undertaking, so I think what you mean is you want to write a game. Not an engine. Although your game will have … | |
Re: As a matter of personal taste, I request you don't use switch/case. If statements would be a lot cleared and would reduce nesting to a degree. Also, if you have output, you can use a ternary operator [code] if(!e) { myVal = a ? aMethod() : defaultValue; myVal2 = b … | |
Re: If you need a reference, I recommend passing into the method by reference as so [code] void f(string &myString) { myString = "name"; } [/code] As rpfd stated, local variables are destroyed when they go out of scope and returning a pointer created in the method is a bad practise … | |
Re: You've misinterpreted the error, which is actually a warning, not an error. You've assigned the data to your variable, but you don't use that variable anywhere in your code to get the data back out of it. So even though you have for example: [icode]srch2 = "DESC";[/icode] you don't use … | |
Re: Instead of using float.Parse (or int.Parse) please use TryParse. If something cannot be parsed using the former method, an exception is thrown. Which means you need to put all your Parsing into a try/catch block. However, TryParse simply returns false if it cannot be parsed making for much tidier code … | |
Re: The Google Translate API is a web service. I don't know the URL but a quick Google should solve that for you. | |
Re: In your GUI class, after you check for the InvokeRequired you must then call Invoke and pass it a delegate (they can be anonymous) I personally suggest Invoking the form, rather than the control as you can then update more than one object at a time and prevents "stuff" from … | |
Re: You would need to add a reference to [icode]System.Reflection[/icode] in your code. Once you've done that, you can create an instance of the class using [icode]Assembly.CreateInstance("insert class name here");[/icode] This will return an object of that type. However, you will still need to cast it if you want to use … | |
Re: Show some effort of what you've done yourself, then tell us what you're stuck on, then tell us what you've tried in an attempt to solve the issue and [b]then[/b] you will probably get help from the community =) | |
Re: 100% CPU usage is common with SpinWait cycles (where you sit in a loop waiting for something to flag or a number of iterations) Other than that, it would be an action you've asked it to perform asynchronously (may not be a part of your code) If stopping one thread … | |
Re: Have you checked that strDir contains a valid directory path? | |
Re: Ok, you've hit one of my pet hates... Please don't use underscore on the beginning of a method name. =p You've created a GlobalVariables class...Sure these could go into a more specific class, such as a Player class? Try and stay away from Globals as much as possible, if you … | |
Re: Unfortunately this is getting less and less likely as extensions can now be varying length and a lot of file/folder names contains periods. The only other method is to make an in memory list at startup of the folder you're watching. So create a "WatchedFile" object which has an "IsDirectory" … | |
Re: I'm not sure you understand ports entirely, I couldn't gather that from your post. To clarify; Your computer won't make the outgoing connection on port 80. It will choose some random high number port. Port 80 is the INBOUND port for a HTTP server, but it doesn't necessarily have to … | |
Re: The questions he's asking look suspiciously like exam practise questions on design methods and coding theory... ;) If this is true, I suggest you ask your [b]lecturer[/b]. They are there to help. Asking them questions about something you don't understand will not penalise you in any way ;) | |
Re: [URL="http://www.maa.org/editorial/mathgames/mathgames_08_16_04.html"]I beg to differ. All these games are written in "pure C++" as you call it. The graphics are created procedurally.[/URL] Games programming is not just software with animated images. Honestly, don't speak if you don't know what you're talking about. Technically *all* software is just an animated image, even … | |
Re: Use the same principle. You're simply rotating a bunch of objects rather than a single one. | |
Re: Totally depends what you want to do. If you want to build a web application, I wouldn't use C :P A good collection to know would be C++, C#, PHP, ASP .NET and Javascript. I baulk at saying Visual Basic because I honestly don't know what advantages it has over … | |
Exact Message: [CODE="plain"]Error 1 error C3861: 'SHOWERROR': identifier not found[/CODE] My Includes: [CODE]#pragma once // Exclude rarely-used stuff from Windows headers #define WIN32_LEAN_AND_MEAN #define SAFE_RELEASE(x) if( x ) { (x)->Release(); (x) = NULL; } #define SAFE_DELETE(x) if( x ) { delete(x); (x) = NULL; } #define SAFE_DELETE_ARRAY(x) if( x ) … | |
Re: You will need to look at the API to see what you are being returned. A generic question like this unfortunately cannot be answered without knowledge of the API. Please look at the documentation and see how the response is formed and what responses you get. | |
Re: You shouldn't be having a problem with transparency going through the form... Goto into your graphics package and give it a Transparent background and import it to your picture box making sure you select the correct image format. Otherwise, pick a non-widely used colour (like that fluorescent pink colour) and … | |
Re: [QUOTE=sfuo;1295858]This is what I noticed when quickly going through your code. [CODE]void AddItem(vector <Inventory> &MyInventory, unsigned &key, int &i) { //change it to &MyInventory instead of *MyInventory since you are going to be changing it like the variable i //this means just pass it in normally and not by reference … | |
Re: To answer your question, it's because nothing is listening on port 7. This is actually from an old echo service that used to run but is no longer in action once ICMP came into effect. If you wish to test the "echo" response, you need to create an ICMP message … | |
Re: Sorry but I have to ask... If you already know a .NET Language why are you trying to build an App using C++ Forms? It's far easier to do it in C#/VB than in C++ If you really do want to use it in C++ then something called MFC is … | |
Re: Your core file failed to build. Which is what causes the bottom two errors. Either that or the fact they're looking for a specific signed version of the library. It may be a good idea to re-reference the Core library in those two projects. Looking at the first two errors … | |
Re: Because it's a [URL="http://en.wikipedia.org/wiki/Reference_(C%2B%2B)"]Reference[/URL] | |
Re: I would use a function lookup table. It can be done with C/C++ compatibility. Here's an example: [code] #include <iostream> #include <string> void FunctionOne() { cout << "Function One Called" << endl; } void FunctionTwo() { cout << "Function Two Called" << endl; } struct { (void)(*function)(); const char* functionName; … | |
Re: Ok, well it's simply a matter of iterating through your data and finding the words beginning with the letters you type and moving them (NOT copy), probably into a separate array for safe keeping. Re-organise your old array alphabetically, then insert your separate array back into the old array at … | |
Re: Ok what you're doing is actually setting the file for download in the browser. If you want to open the file on the server machine then use the File class and the StreamReader/Writer classes. If you want to open the file on the client machine, then you will probably need … | |
Re: Line 27. He passes a single argument. | |
Re: [quote=pritesh2010]But In Sealed class we can not create a constructor of that class, so no instance of that class is possible. Private Constructor of a Private Class = Sealed Class.[/quote] Sorry but that is wrong. Let's take this for example... [code] public sealed class MySingleton { private class Nested { … | |
Re: Could you please post a sample of your code? Are you binding to your PC address or to your router address? They aren't usually the same and some people have made that mistake before. | |
Re: [QUOTE=blackrainbowhun;1294106]I'd gladly help for free but I need to know what's the homework about, your code is messy and it doesn't really mean anything, the goal is missing. PM me and I'll do it! (:[/QUOTE] Please don't. I may not have been here long but, I believe this site isn't … | |
Re: I would probably get a degree in Computer Programming (Making sure that C++ is the language used) :) | |
Re: Personally I would use a database. As you can use arbitrary time slots though, your method of using XML is a good one. However, you will need to jig around your XML format a little. So rather than a string array, make an object that contains your appointments (I have … | |
Re: You can use the CreateProcessW function to spawn an executable process. You will be able to find all the information you need about it on the MSDN | |
Re: It's usually best to keep up to date. There are "Express" versions of every edition to Visual Studio. So I suggest you get Visual Studio 2010 Express, simply because there's no reason [b]not[/b] to use the latest version. Only Visual Studio 2010 allows you work with .NET 4.0. Additionally, VS2010 … | |
Re: The better way to do it is to use the "SelectTab" method [code] { /* Here I declared myTabControl and added three tabs named: "TabOne", "SecondTab", "EndTab" I also have an TabPage object bound to "SecondTab" called tabMySecondTab */ myTabControl.SelectTab(0); // This selects "TabOne" as it is the first in … | |
Re: If you want to go all out, you should inherit the ApplicationContext and create your own forms manager. :) | |
Re: It sure is. Everything is based on the windows form controls, it's just about how you configure them. I suggest you do some googling around the issue. Some keystrings that may be useful are "alert windows C#" & "always on top C#". | |
Re: I think you're being confused about what bind actually does. Bind says "This is the application that wants to start listening on this port at this IP Address. Please forward anything that comes there to me. Also, please don't let anyone else use this IP/Port combination. Thanks o/" and effectively … | |
Re: Firstly, start your own thread to ask the question. Secondly, post the code you've got already, in your new thread. | |
Hello, here's the setup for the project. I have a WCF Service that is hosted on a net.tcp binding in buffered mode and ReliableSession enabled. The binding is configured to use TransportWithMessageCredential security. The certificate is a self signed certificate that I am identifying using the Thumbprint. The UserNameValidator is … | |
Re: Ok you need to think about what your method calls do and your order of execution. The ShowDialog method does just that. It shows the form you created as a dialog box. This means that the code from your parent form stops executing (unless you have multiple threads running which … | |
Re: Huh? Would take about 30 seconds to get that "working". Bad code is bad, bad questions are worse and asking other people to do their work for them should be a ban-able offence. | |
![]() | Re: What exactly are you receiving? The function itself can be found [URL="http://msdn.microsoft.com/en-us/library/dd757160(VS.85).aspx"]here[/URL] which also provides a link to the command messages. You shouldn't be receiving garbage, but one of those commands. If you're not receiving one of those commands then I'm not sure what else you can do. |
The End.