432 Posted Topics
Re: "while" will test a condition before it enters into its code block/body, so it may never ebter it at all. It's usefull if you need to only enter into a loop if its condition is met. If you needed to guarantee loop for example to execute its body at least … | |
Re: To be fair, after I deciphered the OP post, It seems as though the posts from usy1010 are an answer, rather than a question. Seems the OP wanted suggestion of project. | |
Re: for(int i = 0; i<15000000;i++) Since you are looking for an unsigned int, would you not increment your loop like so for(unsigned i = 0; i<15000000; i += sizeof(unsigned)) Take note tht I'm novice so might not be 100% correct about that. | |
Hi. I'm having some touble printing year. Here is the code where I expected an output of "Year: 2013" time_t tm; time(&tm); struct tm ts; errno_t err = localtime_s(&ts,&tm); cout << "Year:\t" << ts.tm_year << endl; But what I get is "Year: 113" Appreciate any help offered. | |
Hi. First I apologize if in wrong section of forum for this question, but I will eventually be working in C++. I don't know where to start on this project, so my terms will most likely be wrong. The idea is to partially hash an executable file, that part of … | |
Re: I imagine you need to get a handle to the "GUI" and use [ShowWindow](http://msdn.microsoft.com/en-gb/library/windows/desktop/ms633548?v=vs.85.aspx) | |
![]() | |
Does anyone know how to restore a window (which does not belong to current process) to the state is was in previous to having been minimized? I've been trying ShowWindow and SetForegroundWindow, but if the window was maximized, it will only restore it to it's RESTORE state (not maximized) ShowWindowAsync(hWnd, … | |
(edit) this is solved, was a unicode issue. Hi I'm hoping someone has used the library [pugixml](http://pugixml.org/) I'm just trying to use a simple example provided but I'm not getting the result I expect. int _tmain(int argc, _TCHAR* argv[]) { pugi::xml_document doc; pugi::xml_parse_result result = doc.load_file("tree.xml"); //pugi::char_t * c = … | |
Hi. I'm having trouble debugging a rather large project. The first issuse is not knowing how to track the bug down. Here is the text from Assertion Error popup while running in debug mode Debug Assertion Failed > Program...nga Path\file.exe > File: f:\dd\vctools\crt_bld\self_x86\crt\src\xtoa.c > Line: 105 > > Expression: sizeInTChars … | |
Re: You have already been told there is no way to safely do this, you either pass the size of the arrays to the function or you don't do it at all unless they are of a known constant size. If you cannot use more parameters then pass the size in … | |
I'm having a little difficulty understanding why a piece of my code cannot be modified to work with stack instead of heap. Well that is just a descriptiom, I'm aware there are no gurantees where my data will be stored. As it stands my working code is... //u_char = unsigned … | |
Re: Perhaps you have to escape the escape character `"C:\\Users\\N.\\Desktop\\Popcorn\\Popcorn\\JJ.cpp"` | |
Hi. I am looking at creating a small app which will gain access to and use the Internet Explorer DOM. I want to access the DOM of an existing instance of Internet Explorer. The app will be basic and simple, and will be first used to retieve properties of web … | |
Re: Never new of nullptr. Just done a quick replace ina large code with nullptr for NULL, and it turns out I must have been using NULL incorrectly in a lot of places where int 0 should have been used. Something new everyday. | |
Hi. How can I properly, and explicitly destroy std vector? Here is how it is created. std::vector<std::wstring> vData = StringSplit(sData,L',');// StringSplit returns a vector of wstring Shortly after using and converting the contents of the container, I no longer need it, or want it hanging around in memory. I don't … | |
Re: I'll post this, I don't think it could be classed as doing homework, I hope. std::cout << char(4) << '\n'; | |
I'm having a bit of a problem with how to code something. Here is how it is in my head. I want a function which is not part of a class to access members of that class, so I want to make the class global. I have done this with … | |
Hi Does anyone know if there is an equivilent of std::stoi (string to Int) for use with wstring that I am missing? Seems a bit odd that it would be ommitted from the library, but I cannot find anything. Thank you for reading. | |
Re: If anyone is to offer you assistance they'd need to see your classes really. | |
Re: Use "cin" to get input from keyboard Use "cout" to display result on screen The code between is just math really. You have a tutor, and people here will help you with your homework but not do it for you. The amount and level of help you receive here is … | |
Re: Convert System::String to LPCTSTR Google top answer. http://stackoverflow.com/questions/9782669/c-cli-system-string-to-mfc-lpctstr | |
I'm using the function GetBitmapBits. MSDN says of the function > The GetBitmapBits function copies the bitmap bits of a specified device-dependent bitmap into a buffer. What it does not say, is how the data is stored, and I need to know this if I'm to analyze each specific color. … | |
Re: Can not determine a problem without miles and fuel classes shown. | |
I have searched high and low for a definitive answer to this, and I cannot find one (that I understand) The windows function [GetPixel](http://msdn.microsoft.com/en-us/library/windows/desktop/dd144909(v=vs.85).aspx) takes 3 arguments (HDC, int, int). Both ints represent a coordinate in the devive context, but are measured in logical units, x = > The x-coordinate, … | |
Re: You are not incrementing argv index, nor are you testing argv index. | |
I'm here with what might seem like a very basic question, but I cannot figure it out. I am using EnumChildWindows winapi to identify a particular child window of google chrome browser. I fail when trying to return the handle of that child window when found. BOOL CALLBACK enum_wnd_proc(HWND h, … | |
Are there any limits to how many bitmap resources you can have embedded in your executable? If it matters, using visual studio 2010, windows platform. | |
Re: Seeing as how you just copied and pasted that code from any number of places around the internet, why don't you just get the answer from the same places, the complete working code is also available. | |
Re: Also the return type of a division operation should be double or float. | |
background. I usually test my code in both debug and release mode each time I make changes, but forgot for half a day and now I have errors. I had gotten carried away thinking I was in the zone, and left it in release mode, when I realized and tried … | |
Re: I don't really think he/she cares since the thread was bumped from 3 years ago. | |
Re: It's customary that one provides some accompanying information. | |
Re: This might be basic, but have you included UI.h in the current file? | |
Re: I am not certain about this but the first thing I would try is for example #include <./gtkmm/window.h> or #include "gtkmm/window.h" | |
Re: I think you first need to store the remainder and then work with it. int remainder = (atoi( argv[1] ) % atoi( argv[2]); Now you work with `remainder` | |
Re: I think your formula is wrong, here's my take. bool is_leap_year( int year ) { if ((year % 4)) { return false; } if ((year % 100)) { return true; } if ((year % 400)) { return false; } return true; } int main() { for (int i= 0; i … | |
Re: Well since a bog standard char is 1 byte, you simply loop every byte testing for char v.. If v is an int or double then you increment your search search by sizeof(v). | |
Re: char* arrayMap[5225]; So the max number you want to test or alter is 5224, arrays start at 0. for (i = 0; i < 5225; i++) // <=================== { if (mapReader.good()) { mapReader >> arrayMap[i]; } } You need to make sure your incrementer does not exceed that number. Also, … | |
I'm trying to be clear about registry, and would hope someone might confirm, or not, that my interpretation is correct. I read [here](http://msdn.microsoft.com/en-gb/library/windows/desktop/ms724072(v=vs.85).aspx) > The parent of each 64-bit registry node is the Image-Specific Node or ISN. The registry redirector transparently directs an application's registry access to the appropriate ISN … | |
Hi, I'm trying to create a *link like* label in a win32 application. VS2010 I generally find an API I can use but I'm having no luck with it currently. Just wondering if anyone has some Ideas? just a starting point will be great. Appreciate you reading, thanks. | |
I was testing a portion of new code in a loop, a lot really, as I was just creating it there were a lot of commened stuff, so when I tries to comment the new code it was being an ass, so I just cut it ready to ctrl + … | |
Re: From looking at "WinMain" it looks like your project is not a console application. | |
Re: I like the method posted by Philippe.Lahaie. You can also acheive this by running without debugging, ctrl + F5 | |
Re: Hi Carolin, you forgot to post the link to your code snippet. | |
Re: I use VS2010, and can tell you that IntelliSense works just fine in C++. perhaps you have an incorrect setting. | |
I'm having a bit of a problem and I cannot figure it out. It seems as though code will only write to one keyname I have an inifile [section] key1= key2= key3= And my code Class I'm using from http://www.codeproject.com/Articles/10809/A-Small-Class-to-Read-INI-File stringstream ss (stringstream::in | stringstream::out); CIniWriter MyIniTest(".\\test.ini"); char out[20] = … | |
I was just thinking of trying to create a simple tcp client server for simple comunication. In my head it was all about typing in a window and my friend sees what I type and then responds. Then as my mind wondered, i thought about making the communication via voice. … | |
I'm thinking of hosting a *name that tune* type game. I don't know anything about PHP or even if it's the languge to use, but I'm hoping someone might put me straight on that matter too. Here is an outline of my needs/scenario. I post a link to a song.mp3 … | |
Re: Firstly I have to say that I'm quite the novice in C++, but I believe my input to be relevant, and might have something to do with your question. It seems to me that the results you are really getting there is how fast you can create and destroy threads, … |
The End.