432 Posted Topics

Member Avatar for Kareem Klas

"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 …

Member Avatar for Kareem Klas
0
334
Member Avatar for arba shahid

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.

Member Avatar for Suzie999
-1
194
Member Avatar for CodyOebel

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.

Member Avatar for Suzie999
0
343
Member Avatar for Suzie999

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.

Member Avatar for Suzie999
0
173
Member Avatar for Suzie999

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 …

Member Avatar for Moschops
0
167
Member Avatar for beginner91

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)

Member Avatar for Ancient Dragon
0
491
Member Avatar for taimor
Member Avatar for Suzie999

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, …

Member Avatar for Ancient Dragon
0
593
Member Avatar for Suzie999

(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 = …

0
160
Member Avatar for Suzie999

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 …

Member Avatar for Suzie999
0
378
Member Avatar for shanki himanshu

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 …

Member Avatar for shanki himanshu
0
379
Member Avatar for Suzie999

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 …

Member Avatar for Suzie999
0
103
Member Avatar for ConfusedLearner

Perhaps you have to escape the escape character `"C:\\Users\\N.\\Desktop\\Popcorn\\Popcorn\\JJ.cpp"`

Member Avatar for Schol-R-LEA
0
165
Member Avatar for Suzie999

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 …

Member Avatar for Suzie999
0
539
Member Avatar for owenransen

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.

Member Avatar for Tumlee
0
700
Member Avatar for Suzie999

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 …

Member Avatar for Suzie999
0
321
Member Avatar for mustafaali382

I'll post this, I don't think it could be classed as doing homework, I hope. std::cout << char(4) << '\n';

Member Avatar for tinstaafl
-1
129
Member Avatar for Suzie999

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 …

Member Avatar for Suzie999
0
474
Member Avatar for Suzie999

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.

Member Avatar for Suzie999
0
215
Member Avatar for Yiggasay
Member Avatar for tinstaafl
0
405
Member Avatar for teha.sani

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 …

Member Avatar for Lucaci Andrew
0
162
Member Avatar for Martje

Convert System::String to LPCTSTR Google top answer. http://stackoverflow.com/questions/9782669/c-cli-system-string-to-mfc-lpctstr

Member Avatar for Suzie999
0
316
Member Avatar for Suzie999

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. …

Member Avatar for Suzie999
0
302
Member Avatar for Rachel Roxx

Can not determine a problem without miles and fuel classes shown.

Member Avatar for Rachel Roxx
0
141
Member Avatar for Suzie999

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, …

Member Avatar for Suzie999
0
285
Member Avatar for lewashby
Member Avatar for Suzie999
0
164
Member Avatar for Suzie999

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, …

Member Avatar for Suzie999
0
1K
Member Avatar for Suzie999

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.

Member Avatar for Suzie999
0
65
Member Avatar for krul.ezanie

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.

Member Avatar for deceptikon
-1
362
Member Avatar for ConfusedLearner
Member Avatar for mrnutty
0
128
Member Avatar for Suzie999

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 …

0
77
Member Avatar for Jennifer84

I don't really think he/she cares since the thread was bumped from 3 years ago.

Member Avatar for rubberman
0
294
Member Avatar for dachy12
Member Avatar for dachy12
0
124
Member Avatar for jim.hurley
Member Avatar for jim.hurley
0
620
Member Avatar for sarah.mathieson.7

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"

Member Avatar for sarah.mathieson.7
0
725
Member Avatar for lewashby

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`

Member Avatar for deceptikon
0
108
Member Avatar for lewashby

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 …

Member Avatar for lewashby
0
197
Member Avatar for Hopp3r

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).

Member Avatar for NathanOliver
0
2K
Member Avatar for Doogledude123

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, …

Member Avatar for Doogledude123
0
283
Member Avatar for Suzie999

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 …

Member Avatar for Ancient Dragon
0
157
Member Avatar for Suzie999

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.

Member Avatar for Suzie999
0
199
Member Avatar for Suzie999

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 + …

Member Avatar for Suzie999
0
163
Member Avatar for mefju

From looking at "WinMain" it looks like your project is not a console application.

Member Avatar for Suzie999
0
119
Member Avatar for firebird102085

I like the method posted by Philippe.Lahaie. You can also acheive this by running without debugging, ctrl + F5

Member Avatar for Suzie999
0
333
Member Avatar for Carolin
Member Avatar for CGSMCMLXXV
0
137
Member Avatar for Raisefamous

I use VS2010, and can tell you that IntelliSense works just fine in C++. perhaps you have an incorrect setting.

Member Avatar for tinstaafl
0
298
Member Avatar for Suzie999

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] = …

Member Avatar for Suzie999
0
163
Member Avatar for Suzie999

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. …

0
56
Member Avatar for Suzie999

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 …

Member Avatar for Suzie999
0
281
Member Avatar for myk45

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, …

Member Avatar for myk45
0
736

The End.