Posts
 
Reputation
Joined
Last Seen
Ranked #4K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
83% Quality Score
Upvotes Received
5
Posts with Upvotes
5
Upvoting Members
5
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
3 Commented Posts
0 Endorsements
Ranked #2K
~20.9K People Reached
Favorite Tags

59 Posted Topics

Member Avatar for VBNick

I just finished up writing a class to encapsulate a pointer-to-pointer that provides auto-release functionality like shared_ptr<T>. I'm curious though, does something like this already exists, in the standard library, boost, ect? I know the idea exists, because in the Unity Engine, when you call Destroy(gameObject), any and all references …

Member Avatar for VBNick
0
146
Member Avatar for kspecks

compiles fine for me. edit: if you are using visual studio 2010, there is a bug. If you think your code is wrong because you see red underlines, it's because you haven't included the header with your template in it in any other files yet. "Error: PCH warning: cannot find …

Member Avatar for VBNick
0
314
Member Avatar for tgifgemini
Member Avatar for VBNick

Hi, if anybody has a second, I have a quick question: In the following situation, Container can contain any combination of the derived classes. If I wanted to go through "Container", for example, and delete all instances of the class DerivedC, how would I do that? [CODE] class Base; class …

Member Avatar for VBNick
0
235
Member Avatar for VBNick

Hi. I was wondering if someone could offer a bit of advice on this. I have made a web server, and everything seems to be done correctly as far as I can tell. It works and loads web pages just fine. The problem is, that when big files are requested …

Member Avatar for VBNick
0
284
Member Avatar for Peter_morley

[quote]If I add a space in any of the strings it will also only display the previous variables and end at the space.[/quote] doesn't the << operator on stringstream parse the input using white-spaces as the delimeter? >oops< link for >> operator [URL="http://www.cplusplus.com/reference/iostream/istream/operator%3E%3E/"]http://www.cplusplus.com/reference/iostream/istream/operator%3E%3E/[/URL]

Member Avatar for Peter_morley
0
238
Member Avatar for ramkumar0022
Member Avatar for VBNick

I was trying to make a for loop count down backwards using this loop, but when it gets to zero, instead of realizing that decrementing will bring the number below zero, it tries to make the unsigned short (-1), which is actually 65535 as unsigned. of course, this code produces …

Member Avatar for William Hemsworth
0
172
Member Avatar for Glass_Joe
Member Avatar for VBNick

I have a simple web server built, and I created a status window that runs on a separate thread. If I have a list of structs being updated by the main thread, is it ok to read(only read) from those structs from the second thread for the purpose of getting …

Member Avatar for mike_2000_17
0
186
Member Avatar for VBNick

If I am using overlapped sockets with i/o completion ports, is it ok to use WSASend on a socket to send data [B]after [/B]posting the initial WSARecv on that same socket, but [B]before [/B]having received any data? Will the socket still receive data and trigger the completion port if I …

Member Avatar for VBNick
0
94
Member Avatar for VBNick

I have read all the MSDN docs on this subject that seemed relevant, but I am still confused about a few things. I am trying to achieve functionality like WSAAsyncSelect(), but use a separate thread instead of the main window. Can I use the regular WSAEventSelect() for this? and if …

0
47
Member Avatar for rv_mup08

reading the time in is probably the most complicated part. I would use stringstream. Give this a shot: [code] #include <iostream> // for accessing the console #include <sstream> #include <string> using namespace std; int main() { //variables for holding the user-inputted time in the format "00:00pm" char startTime[7]; char finishTime[7]; …

Member Avatar for rv_mup08
0
2K
Member Avatar for VBNick

Hullo. I made a small webserver just to flex my winsock muscle, but it only works for small files like html files. Once I have processed the request to get the path of the file, I send the result like this: [code] ifstream fin; fin.open(URL, ios_base::binary | ios_base::in); if (!fin.good() …

Member Avatar for VBNick
0
174
Member Avatar for VBNick

hi, I put together a small app to try using SEE in assembly, but I am getting the wrong output. these are the .cpp file and the .asm file [code=cpp] #define WIN32_LEAN_AND_MEAN #include <iostream> using namespace std; extern "C" int *myFunc(float *a, float *b, float *result); int main(int argc, char …

Member Avatar for VBNick
0
141
Member Avatar for VBNick

Why does the debugger stop execution and give an error when WaitForSingleObject() is called on a closed HANDLE?? when I run my program outside of the VS2010 IDE, WaitForSingleObject(invalid handle) just returns WAIT_FAILED like its supposed to. Is there anything actually wrong with calling it on an invalid handle?

Member Avatar for VBNick
0
2K
Member Avatar for VBNick

can anyone tell me why this would freeze? I'm trying to find a way to terminate a thread from outside of it, and allow the main program to do garbage cleanup, like closing any HANDLEs used or freeing any memory allocated. I trigger an event which should cause that loop …

Member Avatar for VBNick
0
102
Member Avatar for broli100

[code] //google "cross product" for how these calculations work GLvoid CalculateVectorNormal(GLfloat fVert1[], GLfloat fVert2[], GLfloat fVert3[], GLfloat *fNormalX, GLfloat *fNormalY, GLfloat *fNormalZ) { GLfloat Qx, Qy, Qz, Px, Py, Pz; Qx = fVert2[0]-fVert1[0]; Qy = fVert2[1]-fVert1[1]; Qz = fVert2[2]-fVert1[2]; Px = fVert3[0]-fVert1[0]; Py = fVert3[1]-fVert1[1]; Pz = fVert3[2]-fVert1[2]; *fNormalX = …

Member Avatar for broli100
0
256
Member Avatar for VBNick

I just finished a small winsock program for sending files, but its soooooooooooooooooooooooooooooooooooooooooooooooooooooooo slooooowwwwwwwwwwwwwwwww:yawn: so I am hoping someone here may be able to offer me some advice. so far, the program works as follows: 1. User1 chooses a file and attempts to send it. 2. User2 chooses to accept …

Member Avatar for VBNick
0
656
Member Avatar for VBNick

I made a simple app to turn off a monitor. The entire program consists of just this: monoff.cpp [code] #include "windows.h" #define MON_OFF 0x2 int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { SendMessage(HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, MON_OFF); return 0; } [/code] For some reason it still wont run …

Member Avatar for VBNick
0
290
Member Avatar for VBNick

I need a little help with this :icon_redface: if I use ifstream::read() and go past the end of the file, how do I tell how many chars have been read? thanks, Nick

Member Avatar for VBNick
0
251
Member Avatar for Member 785530

SetCursorPos [URL="http://msdn.microsoft.com/en-us/library/ms648394%28VS.85%29.aspx"]http://msdn.microsoft.com/en-us/library/ms648394%28VS.85%29.aspx[/URL] GetCursorPos [URL="http://msdn.microsoft.com/en-us/library/ms648390%28VS.85%29.aspx"]http://msdn.microsoft.com/en-us/library/ms648390%28VS.85%29.aspx[/URL] Creating a simple window [URL="http://www.winprog.org/tutorial/simple_window.html"]http://www.winprog.org/tutorial/simple_window.html[/URL]

Member Avatar for jonsca
0
113
Member Avatar for vlad44

ofstream out("file2", ios::out |ios::binary | [COLOR="Green"]ios::app[/COLOR]); reference: [url]http://www.cplusplus.com/reference/iostream/fstream/open/[/url]

Member Avatar for vlad44
0
113
Member Avatar for VBNick

I have a small test program made, and it actually fully works. It connects, and you can send messages back and forth.....but for some reason, when I call connect(), It returns SOCKET_ERROR, but connects, and works fine anyways. Does anyone know why? here is the code: see lines 160, 161 …

Member Avatar for VBNick
0
221
Member Avatar for mayank101505

my preference: [url]http://www.cplusplus.com/reference/clibrary/cstdio/fscanf/[/url] you can also use this: [url]http://www.cplusplus.com/reference/iostream/fstream/[/url]

Member Avatar for Excizted
0
90
Member Avatar for VBNick

Hi, I am trying to make a windows forms application that starts using Sub Main instead of the Form1_Load event. I have tried putting this in Public Class Form1 [code="vb"] Public Shared Sub Main() MsgBox("ASdf") End Sub [/code] and also tried putting this at the top of the programs code …

Member Avatar for VBNick
0
164
Member Avatar for Chaos3737

I'm only really use OpenGL ES for mobile devices, so don't quote me, but I think your keyboard procedure is the problem. You shouldn't be calling glTranslatef from inside the keyboard proc, because that one matrix will end up being applied to the entire scene. You have make your keyboard …

Member Avatar for VBNick
0
462
Member Avatar for VBNick

Hi, Does anybody know how to enable/disable a secondary monitor using ChangeDisplaySettingsEx or any other function?

Member Avatar for VBNick
0
647
Member Avatar for VBNick

Is there a way to put a computer to sleep somehow other than clicking start, then sleep? I am using a shortcut to this right now: C:\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState 0,1,0 but it doesnt do the same thing as clicking "Sleep" in the start menu. I need a piece of C++ code, …

Member Avatar for VBNick
0
1K
Member Avatar for happygeek
Member Avatar for VBNick

Hello! I made a little app/page to help me count the money when Im done my shift at work. It runs fine in IExplorer, but it wont run in Firefox..can someone help? [CODE="html"] <html> <head> <title>Money Calculator 1.0</title> </head> <body> <script type="text/javascript"> function clr() { document.getElementById("hundred").value=0; document.getElementById("fifty").value=0; document.getElementById("twenty").value=0; document.getElementById("ten").value=0; document.getElementById("five").value=0; …

Member Avatar for VBNick
0
150
Member Avatar for VBNick

I can't figure out, or google how to do this =/ I just need something to put my computer to sleep [CODE="cplusplus"] #pragma comment (lib, "PowrProf.lib") #include "stdafx.h" #include "windows.h" #include "Powrprof.h" int _tmain(int argc, _TCHAR* argv[]) { SetSuspendState(false, false, false); return 0; } [/CODE] I get this error: 1>Sleeper.obj …

0
65
Member Avatar for VBNick

Hello! I am trying to read a value from the registry, but I can't get it to work. Everything compiles, but RegQueryValueEx keeps producing an error. this is the code: [code lang="cplusplus"] #include "stdafx.h" #include <windows.h> #include <iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { HKEY hKey = …

Member Avatar for VBNick
0
171
Member Avatar for VBNick

I posted yesterday with some questions about making a mouse utility to replace the double click with a single keystroke. I finally put it all together, and came up with this DLL: [code="cplusplus"] #include "stdafx.h" #include <windows.h> #include <stdio.h> HHOOK hook = 0; bool quit = false; LRESULT CALLBACK ClickProc(int …

Member Avatar for VBNick
0
146
Member Avatar for VBNick

Hello! I have a piece of software called X-Mouse Button Control, and its able to intercept mouse events. The website for my mouse had this instead of a driver specifically for the mouse. In the program, I am able to "Intercept" the functions of Leftclick, Rightclick, ect, globally for windows. …

Member Avatar for VBNick
0
2K
Member Avatar for VBNick

Hello~! ...again.. I got some help from you guys a while ago with this same app because it wouldn't run on winxp. It runs fine now, but my brother is still telling me he cant get it to work right...so rather than go through all the trouble of trouble shooting(he …

Member Avatar for Salem
0
257
Member Avatar for VBNick

Sup guys...I tried to make a little program my brother asked for to try and increase his odds of winning the lotto! lol... anywho, It compiles and runs fine on my computer, but I tried it on two different computers running XP, and it doesnt work =( Both computers I …

Member Avatar for tux4life
0
157
Member Avatar for VBNick

Hi. I am trying to use assembly in C++, and need a few pointers(pun intended) lol I want to use C++ structs as operands, but can't figure out how. my code is like this so far: TEST.CPP [code=cplusplus] extern "C" WORD _add(WORD num1, WORD num2); int _tmain(int argc, _TCHAR* argv[]) …

Member Avatar for MosaicFuneral
0
490
Member Avatar for VBNick

I put together a simple speech recognizer. It works fine, but when I click the X to close it, it takes forever to unload... can I do anything about it? [CODE] Dim WithEvents RecoContext As SpInProcRecoContext 'RC Dim Grammar As ISpeechRecoGrammar Dim Recognizer As SpInprocRecognizer Private Sub Form_Unload(Cancel As Integer) …

Member Avatar for VBNick
0
158
Member Avatar for VBNick

right now, I am allocating a dynamic 2D array for my rasterizer's edge list. My setup looks like this: [code="cplusplus"] struct EDGE { float x, dx; float uvws[4]; //u, v, 1/z, shade float duvws[4]; float y_limit[2]; bool active; }; struct EDGERECORD { EDGE *left_edge; EDGE *right_edge; EDGE edges[9]; UINT16 num_edges; …

Member Avatar for VBNick
0
140
Member Avatar for VBNick

hello! I am trying to learn how to do paralell processing. I am baseing this on an example that I saw here: [url]http://www.codeproject.com/KB/recipes/sseintro.aspx[/url] the one titled "SSETest Demo Project" I tried to make my own, and don't understand why it isn't working. Here is the code: [code="cplusplus"] // testconsole.cpp : …

Member Avatar for VBNick
0
231
Member Avatar for VBNick

Im having a very strange problem that I can't explain =/ this is what the compiler is saying: 1>------ Build started: Project: 3d, Configuration: Debug Win32 ------ 1>Compiling... 1>RENDER.CPP 1>Generating Code... 1>Compiling... 1>GEOM.CPP 1>MAIN.CPP 1>MOVEMENT.CPP 1>Generating Code... 1>Linking... 1>MAIN.obj : error LNK2005: "struct OBJECT * obj" (?obj@@3PAUOBJECT@@A) already defined in …

Member Avatar for VBNick
0
297
Member Avatar for VBNick

I literally picked up asm today. I have been trying to create a 3d software rendering engine in C++, and figured out doing things directly would be faster....but, I tried the following code: [code="cplusplus"] int _tmain(int argc, _TCHAR* argv[]) { int num, timestart, dur; timestart = clock(); for(int i = …

Member Avatar for VBNick
0
124
Member Avatar for VBNick

I can't believe my eyes...the entire course is online! I am finding more and more of these lately. [url]http://www.youtube.com/view_play_list?p=84A56BC7F4A1F852[/url] about 20 complete lectures from the Programming Methodology class at Standford University.

Member Avatar for ddanbe
0
55
Member Avatar for VBNick

I have seen functions defined these two ways: function(type *variablename) function(type variablename&) I commonly use the first one to pass on pointers to my structs, but is the second one the same as the first?

Member Avatar for VBNick
0
310
Member Avatar for VBNick

Hi, I'm trying to make 3D clipping for my 3D projection program, and I am having trouble with the FOV calculations. The problem is that I set FOV to 45, but a point placed at 45 degrees from the camera does not appear at the edge of the viewport. I …

Member Avatar for VBNick
0
153
Member Avatar for VBNick

when a cursor key is pressed, WM_KEYDOWN is received, and when it is released, WM_KEYUP is received. How can I get this same functionality with a character key? I found the messages WM_CHAR and WM_DEADCHAR, but they dont work like the above messages. Can anyone help? Thanks, Nick

Member Avatar for VBNick
0
153
Member Avatar for VBNick

i have a struct with an array of three points in it, for example: struct POINTS { POINT pts[3]; }; then I have another struct with two single points in it like this: struct EDGE { POINT *p1, *p2; } is there a way to set p1 to a single …

Member Avatar for Murtan
0
151
Member Avatar for VBNick

I posted this question in the regular C++ forum and havn't gotten any answers. hoping I will have better luck here, here was the question: [URL="http://www.daniweb.com/forums/thread160790.html"]http://www.daniweb.com/forums/thread160790.html[/URL] I need to load a bitmap from file, and get an array of bits that I cain use. I have used CreateDIBSection() to create …

Member Avatar for VBNick
0
164
Member Avatar for VBNick

hi, I have used LoadImage() to load a bitmap as HBITMAP. If I use SelectObject() to attach it to an HDC, and then BitBlt() it to the screen, that works fine. I need an array that would be compatible with the one produced by CreateDIBSection(). I have tried GetBitmapBits(), and …

Member Avatar for VBNick
0
475

The End.