432 Posted Topics

Member Avatar for pjh-10

This is a very simple question you might have easily looked up from a search engine you might consider that next time ;) http://msdn.microsoft.com/en-us/library/s3f49ktz(v=vs.71).aspx (edit) for the record the term is "Byte" as opposed to "Bite". (edit2) it also might vary on how many bytes are actually used, depending on …

Member Avatar for vmanes
0
228
Member Avatar for Suzie999

Seemingly, bitmap resources within my file are becoming somehow corrupted. My code has resource bitmap image, when ran, it searches the screen for that image and returns its xy location. Runs fine and works fine at least once, and sometimes more, but then fails to find the image. When I …

Member Avatar for Suzie999
0
107
Member Avatar for Carc369

I'm not sure you can use char in switch condition. But if you could it would look like this. char pick; cin >> pick; if(pick == 'a' || pick == 'A') stuff inside here //For case switch... can you do the following: switch(pick) { case 'a': case 'A': stuff here; …

Member Avatar for awaisahmad13
0
139
Member Avatar for Suzie999

Sorry for posing here, but i could not find a suitable section. I am a bit worried about my private data from projects on the internet. I will just explain my worries. In cpanel I have file manager, from file manager I select a folder then a file, I set …

Member Avatar for Suzie999
0
220
Member Avatar for markwiering
Member Avatar for markwiering
0
1K
Member Avatar for Suzie999

Hi I'm hoping to get some starting points here in a subject that scares me, RegExp. I've looked at a couple of tutorials but they all seem to be based on std::string. I'd like to use std::tr1::regex but I don't know where to start or even if it's possible without …

Member Avatar for Suzie999
0
2K
Member Avatar for Suzie999

I am getting results from a routine which are unexpected from me. here is athe code. void MyTestFunc(){ u_char MyTest_u_char[10] = {'a','b','c','d','e','f','g','h','i','j'}; u_char * MyTest_u_char2 = new u_char[8]; memcpy(MyTest_u_char2,&MyTest_u_char[1],sizeof(u_char)*8); int raw_len = sizeof(MyTest_u_char2) + 1; string std_str(MyTest_u_char2, MyTest_u_char2 + raw_len); cout << std_str << endl; // expecting bcdefghi . getting …

Member Avatar for deceptikon
0
143
Member Avatar for ShEeRMiLiTaNt
Member Avatar for ShEeRMiLiTaNt
0
129
Member Avatar for Suzie999

Just wondering what general thoughts there are regarding the pros and cons of `using namespace NameSpace;` vs `NameSpace::Method` Such as, are there any performance gains with one or the other etc...?

Member Avatar for vijayan121
0
257
Member Avatar for Dudearoo

I think this member is wanting advice on how to insert a string/char* between two other specified strings/char*. For example he reads a html file looks for first string "<div>" if found, looks for it's closing tag "</div>", or other specified string Then insert between those tags/strings outputting "<div>some string</div>"

Member Avatar for Suzie999
0
246
Member Avatar for Carpetfizz

In vs2010 there is an option for pre compiled headers under console applications, try ticking the box.

Member Avatar for Suzie999
0
167
Member Avatar for Salman93

Looks like a homework assignment. It is expected of members to at least try to code something themselves before asking for help. You do that, and you will find a lot of very knowledgable and helpful members willing to help you.

Member Avatar for WaltP
-2
131
Member Avatar for pattilupwned

Try modifying line 26 inputFile.open("prog1.txt", ifstream::in); (edit) I know this was marked as solved, but in lieu of the OP providing a solution I thought I'd try to provide one for reference.

Member Avatar for Suzie999
0
439
Member Avatar for melissa.kapolka

That appears to be a prototype for a function, at least in the context of there being no other evidence to the contrary. float **scores looks like a pointer to a pointer to a float value. Without anything else, there is not much to say about it.

Member Avatar for melissa.kapolka
0
97
Member Avatar for ChilledGrease

> Shorter's not always better. I keep telling that to my husband, but he says I don't know what I'm talking about.

Member Avatar for Suzie999
0
290
Member Avatar for np complete

> The Chef needs to pick 2 horses Is he cooking them, or making a wager? Sorry.

Member Avatar for np complete
1
1K
Member Avatar for Lienordni

You could get started with [ShellExecute](http://msdn.microsoft.com/en-us/library/windows/desktop/bb762153(v=vs.85).aspx) API function. Assuming you are working with Windows*

Member Avatar for Suzie999
-1
303
Member Avatar for waqas94

Pass the array to a function, and its length of course. pseudo func code: unsigned returnval = 9999999999999; // or the highest value you expect for(unsigned i = 0; i < len; i++){ if(array element i is greater than returnval){ continue the loop } else make returnval equal to array …

Member Avatar for WaltP
0
117
Member Avatar for Suzie999

Hi, I'm hoping someone might be able to help me with what I think might be a simple problem. I have came across the need to add to an unsigned char array a literal single quote "'" My question is how can I achieve that? unsigned char uArray[4]; uArray[0] = …

Member Avatar for Bob
0
133
Member Avatar for Harshini Divya

I'm quite sure that the people who help others here do not complete another persons homework for them. I suggest you post what you have tried, with a little explanation of it.

Member Avatar for Lucaci Andrew
-2
207
Member Avatar for Suzie999

Hi, I wonder if anyone can direct me to a win32 API or offer some logic as to how I might copy memory to a specific location in an array. What I am doing at the moment is copying an unsigned int into an unsigned char[]. The reason is to …

Member Avatar for Suzie999
0
147
Member Avatar for Suzie999

I have been trying in vain to pass an array to a thread and have that thread loop through it. Here is code of a simple thread passing an int to it. #include "stdafx.h" #include <windows.h> #include <stdio.h> #include <stdlib.h> #include <iostream> DWORD ThreadProc (LPVOID lpdwThreadParam ); int threadnumber = …

Member Avatar for Suzie999
0
213
Member Avatar for Suzie999

I'm trying to split an array which is that of unsigned char where NULL marks the split point I have written this code, but it just looks clunky, and I would like to ask advice on any other more efficient methods of doing such a thing there might be. #include …

Member Avatar for Suzie999
0
1K
Member Avatar for Suzie999

If I mouse over the following link, I get a thumbnail image appear of the content at link address. http://msdn.microsoft.com/en-us/library/ms683196%28v=vs.85%29.aspx How do they do that? I'm quite the novice at web development but really intrigued by this.

Member Avatar for pritaeas
0
38
Member Avatar for Suzie999

Hi I'm wondering if there is a simple win32 API to retrieve the current module filename (xxxx.exe) I know about GetModuleFilename which gets the full path. And I have read that argv[0] holds the exe name, but that also give me the full path. What I'm after is an API …

Member Avatar for Suzie999
0
312
Member Avatar for Suzie999

I do apologise for not knowing a single thing about JavaScript. I am under the impression that I can have a code to handle events in a webpage header. I am specicically reffering to Internet Explorer Browser. My goal it to capture and handle the event BeforeNavigate2. I would be …

Member Avatar for Suzie999
0
298
Member Avatar for Suzie999

I'm currently concantenating an array like so... int _tmain(int argc, _TCHAR* argv[]) { //create buffer to receive path WCHAR pathbuf[MAX_PATH]; //get path into buffer DWORD pathlen = GetCurrentDirectoryW(MAX_PATH,pathbuf); //append file name to buffer pathbuf[pathlen++] = '\'; pathbuf[pathlen++] = 'f'; pathbuf[pathlen++] = 'i'; pathbuf[pathlen++] = 'l'; pathbuf[pathlen++] = 'e'; pathbuf[pathlen++] = …

Member Avatar for Suzie999
0
213
Member Avatar for Suzie999

Whenever I create some small tool in c++ dll for use with another language, a new user always has to download the microsoft redistributable package and install it. Is there anyway to add the resources needed from the redist, to my dll? How even do you know what resources it …

Member Avatar for Suzie999
0
186
Member Avatar for Suzie999

I am downloading content from a web source using URLDownloadToFile winapi function All is well, with that, the content is downloaded to the correct path. My probems start when I try to read it, like below, the loop never exits. myReadFile.open(sFile); if (myReadFile.is_open()) { while (!myReadFile.eof()) { //code; } } …

Member Avatar for Suzie999
0
103
Member Avatar for Suzie999

I'm having trouble with getpixel function. Sometimes it returns the correct pixel ref and others it returns "4294967295" which I think is "CLR_INVALID" COLORREF color; HDC hdc_ = GetDC(NULL); //get dc of whole screen color = GetPixel(hdc_, 10, 10); std::cout << color << endl; That is the simple code, any …

Member Avatar for Suzie999
0
2K
Member Avatar for KRUX17

This seems like such a simple and basic code to write on the face of it, it's hard to understand what exactly you are having trouble with. Please provide your attempt.

Member Avatar for KRUX17
0
139
Member Avatar for Suzie999

Have a situation with my code, where it appears the stringstream object is not being cleared. Here is my code, this code will set an interprocess shared variable, The code is simplified to illustrate my problem, and all other variables are there to aid in that, for instance, the ints …

Member Avatar for Suzie999
0
259
Member Avatar for kuramahiei

Well since only half of the code is there it's difficult to tell. My guess is that this is a function called from you menu function. If so, it may be as simple as replacing [ICODE]if (FinishTime == "q") { menu(); }[/ICODE] with [ICODE]if (FinishTime == "q") { return NULL; …

Member Avatar for WaltP
0
183
Member Avatar for mjacqu4

That is an odd one. What I would do is try opening files the same name but with one character changed. To see where the problem lies, and if something needs escaping. That is of course, if it's the filename that is the problem and not the file itself.

Member Avatar for mjacqu4
0
136
Member Avatar for Suzie999

From what I have read, command line arguments are only char* separated by space. However feel compelled to ask if anyone knows of a way to get a pointer across to an executable in any fashion? The goal is to pass int *pointers for reasons of inter process communication across …

Member Avatar for Suzie999
0
901
Member Avatar for 4hotkiss

There are many many books available, but for me it was web based, and still is. i just look up a keyword or function on msdn. There are also tutorial websites, infact too many to list, but, here is one I notice a lot [url]http://www.learncpp.com/[/url]

Member Avatar for tungnk1993
0
96
Member Avatar for Suzie999

I got a warning from vs2010 at compile time (C4172 returning local variable or temp) [CODE] int foo(){ int* bar = Bar() } int* Bar(){ int array[2]; array[0] = 1; array[1] = 2; return array; } [/CODE] if I understand the reason for this correctly, that the array 'array' in …

Member Avatar for Suzie999
0
129
Member Avatar for Suzie999

Hi all, hope you are well. I'm having some trouble trying to convert the literal value of a hex number to int. I say literal but I'm not sure if that is the correct term, but my code will explain better I hope. I have simplified the code down to …

Member Avatar for Moschops
0
431
Member Avatar for Suzie999

Hi I have a function I use in a win32 dll which downloads the source of a web page to file. The primary windows function used in it is "URLDownloadToFile" in "urlmon.h" But I would like to have a function that downloads directly to a string or char array. I …

Member Avatar for thines01
0
149
Member Avatar for Suzie999

First I hope this is in the correct location, I apologize if it is not. [B]Here is what I'm talking about[/B] When a browser, or indeed windows crashes, or power is lost to computer after a restart of computer or application, the browser offers to restore your pages from the …

Member Avatar for PhilliePhan
0
99
Member Avatar for Lmhelp

1) That area is called the Browser control. The client area begins below the menubar. 2) I know little about javascript, but you can get its reletive coordinates from other languages such as C++, and C#. 3) Not sure, I just see them as GUIs and look on msdn (I …

Member Avatar for Suzie999
0
900
Member Avatar for Suzie999

How can I get a new line in messagebox? I have two TCHAR arrays, I can print both to separate MB but not both to one This is what I'm looking for (if you can understand what I'm trying) It obviously does not work. [CODE]TCHAR one[] = _T("file\\path\\here"); TCHAR two[] …

Member Avatar for Suzie999
0
432
Member Avatar for james6754

Because "answer" is only assigned a value under a condition. If that condition is not met, you still try to use its value later. You can avoid it by initially assigning it a value to begin with.

Member Avatar for TheJohnSpecko
0
90
Member Avatar for Suzie999

I am trying to compare a string literal with a string downloaded from a webpage. Here is my code. [CODE]using System; using System.Collections.Generic; using System.Text; namespace testsource { class Program { static void Main(string[] args) { string source = getPageSource(@"http://www.mywebsite.co.uk/index.php"); string fromsource = source; Console.WriteLine(fromsource); //Displays Text Here in console …

Member Avatar for Suzie999
0
103
Member Avatar for Suzie999

Hi Can anyone help me with path variables. My problem is a referenced a dll file as part of my project, and in the reference properties it has "C:\users\susan\desktop\project1\xfind.dll" as its path I tried removing it, and adding its reference to the windows system dir but it just goes back …

Member Avatar for Suzie999
0
333
Member Avatar for Suzie999

I'm trying to use a variable as a case condition, however it seems you cannot, as the error I get is "constant expected" I'm wondering if there is a way to work around this limitation? my variable is a string.

Member Avatar for Suzie999
0
66
Member Avatar for Suzie999

I've been working on a project for a while, which for my convenience is a console app. The time is nearing where I will be needing to add forms to it, so what I'm after here is any advice on things to consider and look out for, before I do …

Member Avatar for gusano79
0
2K
Member Avatar for goldeneagle217
Member Avatar for Suzie999
0
157
Member Avatar for Suzie999

So here I am back again with my tail between my legs. I've spent the whole day trying to update my form lable during runtime. I got there in the end with what I think is threadsafe, then only to spend a few more hours trying do it from outside …

Member Avatar for Suzie999
0
206
Member Avatar for Suzie999

I;m not a great fan of title bars on windows forms, so I've removed it. However I'm looking for a way for the end user to drag it to wherever they choose. Is there a way in the .Net framework? All my searches resulted in importing user32.dll, but the majority …

Member Avatar for Suzie999
0
120

The End.