
rifter1818
Avatar/Signature-
Posts
257 -
Joined
-
Last visited
About rifter1818
- Birthday 04/25/1986
Personal Information
-
Occupation
Student
-
Visual Studio .NET Version
.net 2003 Academic & Professional, 2005 Beta
-
.NET Preferred Language
VB.net,C#
rifter1818's Achievements
Newbie (1/14)
0
Reputation
-
Does anyone know how the following could be tied into windows xp? 1) Custom desktop - id like to write a new program to manage the desktop, Icons would be able to have different sizes and free floating positions. Also just any information on writing a customized desktop/ accessing the data windows uses for its desktop and the "right click" menu that the windows desktop has. 2) Custom Start menu - reprogram the windows start menu. Reorganize / resize (height only) the items in the windows start menu, also have a program that keeps data on how often each item is used, search times etc... Does anyone know of any slightly less painfull ways of doing these, (writing a new OS, is a little out of the range for the time i have available for this). Thanks
-
ok, it seems to me like something is acting as garbage collection on my c++ code, and i would like it to stop,.. every time i call a constructor inside a function by the time it exits that function the pointer i constructed is now pointing at nothing whatsoever.... ive found ways of avoiding it in some cases but not all and need help. What i want to word void construct(classtype1 *variable) { variable = new classtype1(); } works fine in the function but once it ends the function variable is now set to god knows what. however void construct(classtype1& variable) { variable = classtype1(); } is fine. So through my train of logic it would seem that this mysterious garbage collection (which to my knowledge of c++ shouldnt exist) seems to have decread that pointers are too hard to track and therefor dont exist outside of that function so it can go ahead and cleanup the variable i just created. This problem has caused me hours of headaches.. Is there any way to make the pain stop? Oh yes im using the win32 console application as im not coding in managed c++ (where having GC running would make sence to me). edit: another instance of this problem has been when i created a deque of pointers, in that case to various objects like... the asteroids in my asteroids game, then i created a function which added a pointer to this list, the function ran fine, i checked inside the function everything was fine, but once that function ended, the menace came and destroyed my asteroid, causing my application to crash when it tried to render the random garbage the pointer now pointed at.
-
Im working with C# and i need an input method that can ignore whitespace (from a file) something like c++'s ifstream would be great... inputing floats, strings and ints. Really soon would be nice too as the time i have to finish is measured in hours, thanks.
-
the structs struct VECTOR { float x,y,z,w; }; and/or struct VECTOR { union { float v[4]; struct{float x,y,z,w;}; } } the challange so that x ( and v[0]) are alligned to a 16 byte boundary but y,z,w are not (come 4 bytes (1 float) after the previous variable) resoning being so that they can be copied into a XMM registry faster by using MOVAPS instead of MOVUPS. any ideas?
-
ok i found what i should be doing, under project properties,debbuging, command arguments i put <in.txt >out.txt ive changed the build directory to the main directory however now it says that it cant run the application because the output file is invalid (cant redirect output...) however if i just put <in.txt as the arguments it runs but doesnt input(from the file)! any ideas? edit ive even changed it to <$(SolutionDir)in.txt >$(SolutionDir)out.txt which gets rid of the invalid file problem however it still inputs from keyboard and outputs to screen!
-
this isnt so much syntax as it is the editor what i want is to set up the enviornment so i can add 2 text files to my project (in.txt, and out.txt) such that when i tell it run my program it will use in for input and out for output (command line arguments <in.txt >out.txt) where would i enter "<in.txt >out.txt", will there be a problem with the fact that the txt files are in the project directory while the exicutables are in 'debug' and what should be done to fix such a problem?
-
its more of a theoretical collision detection, so the triangles could be any shape,...
-
Didnt know what section to post this in (i know it really isnt .net related at all) but someone on here has to be sufficiantly stronger at math than me and know this. Say i have two triangles (in 2d in this case), both of which have known position,dimension,and velocities, how can i detect if they collide over a given time range. I tried to find a solution but i got lost Triangle one P0 P1 P2 moving at V0 Triangle two P3 P4 P5 moving at V1 (P,P0-P5 are all points V0,V1 are velocity vectors) closest i could realise is that with x being the time range i was looking for if there is a P such that P = ((P1-P0)*v) + (P0 + xV0) + ((P2-P0)*u) = ((P4-P3)*w) + ((P5-P3)*z) + P3 + xV1 such that v,u,w,z,v+u,w+z are all (floats) between 0 and 1 really no idea how to solve this since there could be 0 or infinite P's (not quite infinite due to limited percision but you know what i mean) and there are 4 free variables and one range. just going on a wild guess but im way off track any pointers?
-
my problem is this, i have a class (we shall name A) inheriting class B and my compiler will not let my A::[memberfunction] access the private variables in class B, which of course through inheritance are now variables in class A. this is driving me nuts, it can be ignored in this case because its in a dll, so i can make everything in B public and just not include the should be private ones in the including header file. but shouldnt a class that inherits something be able to access its own members?
-
Hi i was wondering where i could find some good tutorials covering VS 2003 maro editor. The thing i am wondering how to do with macros (now there will be more questions) is what event do i code so that i can add text whenever a .h file is created. for example if i wanted every header file created to start with #ifndef [headername]_[iD] #define [headername]_[iD] #endif and yes i know that you can use things like #pragma once, and im pretty sure theres a command line option that can be set in VS2003 but more important that just this use is how to do it, and where i can find easy to read help on coding the macros. I would assume that others probably would find this usefull too. Also on a side note over a year ago i found a macro (theres a link on this forum somewhere) that minimized all of the code when you loaded a project, if someone could post the link again or the code for the macro that'd be great. Thanks in advance.
-
PlausiblyDamp Any chance i could get an example of using delegates. i tried delegate void PEVENT(Object Sender,EventArgs e); PEVENT[] FUNCS = {...}; Compiler did not agree that this was a good solution.
-
Heres an odd situation ive got myself into, i want to create an array of what i would in C++ call function pointers,.. in a C# application... pretty much what i would like to create is a situation like this (void(Object,EventArgs))[] FPs = {fcNEW,fcLOAD,fcEDIT,fcWHATEVER...}; void fcNEW(Object Sender,EventArgs e){...} void fcLOAD(Object Sender,EventArgs e){...} //and so on if my choice of (void(Object,EventArgs)) didnt give it away i am using these as functions that will be used to handle events, click events on buttons in this case allthought that is errelevant. There are other ways of doing this, but this one seems intreaging enough to ask whether it can be done or not, also can you have null elements. (probably best explaned by a another code segment) void SetupButtons(string[] CAPTIONS,(void(Object,EventArgs))[] CLICKEVENTS) { for(int i=0;i<=CAPTIONS.GetUpperBound(0);i++) { cmdBUTTON[i].text = CAPTIONS[i]; cmdBUTTON[i].Click += new EventHandler(CLICKEVENTS[i]); } } Once again i know there are other ways of avoiding needing this array, but still, can it be done? and what needs to replace (void(Object,EventArgs)) ?
-
oh yes and before i forget can you have inline function pointers? (/how?)
-
Rather quite in here. Hmm thats rather suspicious as someone here must have the answers.... Anyways my pointing saga continues, ive found a few sites helping me with function pointers but they are so far failing to work, my compiler (VS.net 2003) wants to make all of my function pointers part of the class (not sure the right term here but 1 for each instance of the class aka bad thing (memory inefficiant and have to make constructers set them to point at the right functions therefor also slow....) so i have come up with the following solution (that may be a very generous usage of the term and when this invevitably fails will be edited to read idea...). Have each class member function call a global function pointer (and make them all inline to avoid extra code usage) (efficiancy is key meaning its a bad idea for me to code it but its too late to change that) this also solves the problem that i couldnt figureout/find a way to make operator pointers (ohh the error descriptions where entertainment though)... so my suggestion //in vector.h class __declspec(dllexport) VECTOR { public: union { float v[4]; struct{float x,y,z,w;}; }; inline void ADD(const VECTOR&); }; //in vector.cpp void (*ADDF)(VECTOR& Dest,const VECTOR& L,const VECTOR& R); void ADDSSE(VECTOR& Dest,cosnt VECTOR& L,const VECTOR& R) { ....//wouldn't actually bother using sse for addition but its just an example } void ADD3DNOW(...) { ... } inline void VECTOR::ADD(const VECTOR& r) { ADDF(this,this,r); //can i do that pass it as a const and a non constant byref argument? } and id have the DllMain() assign ADDF to the proper function... oh ya by the way this is all in a dll just to make it easier. Next Question since all of my functions are inline will it work if a inline function inside a dll is called (from outside the dll) and it calls an inline function... oi 1) what will the compiler do and before you answer that 2) do i want to know... And of course the really important question will this work? how bad an idea is it? and of course any pointers on better ways to do this etc would be appreciated.