pseudorandom21 166 Practically a Posting Shark

You might look into software designed to make programs portable, who knows maybe one of them will work with it?

pseudorandom21 166 Practically a Posting Shark

Don't dictionaries usually call them "di's"?

pseudorandom21 166 Practically a Posting Shark

lolwut?

pseudorandom21 166 Practically a Posting Shark

I highly recommend Microsoft Visual Studio Express, which is free.
http://www.microsoft.com/express

Now-a-days with uber-high-level languages like C# and VB that include a "forms designer" you don't have to code the main window and buttons, etc. yourself, they are called "controls" and VS will allow you to drag-and-drop them using the forms designer.

Of course there is still a lot of use for actual coding knowledge, but you might start with some youtube videos about using the Visual Studio forms designer with C# and then progress to writing a lot more code. A simple example would involve making a new C# "Windows Forms Application" and adding a "Button" control from the Visual Studio "Toolbox" window to the form, and then handling the button's "Click" event, to run some code.

Presumably you've already read about C# and it's high level features like garbage collection and the .NET framework, so I would say it's best to write some small applications to start with.

In a short time (for someone with prior coding experience), you'll be able to write some clever applications that do high-level stuff. C# is one of the better high-level languages in my opinion. Happy coding!

pseudorandom21 166 Practically a Posting Shark

I think there are plenty of solutions here, I hope the thread owner closes this thread soon or tells us about a problem.

JOSheaIV commented: He helped me threw this problem alot (and since it will be awhile before I could get back to it I decided to answer it solved and give this guy some Kudos for it) +3
pseudorandom21 166 Practically a Posting Shark

iv coded it for ppl convenience.. u can check

No you haven't, you didn't indent it properly or your paste got messed up by not using the code tags and then you copied the unformatted text and pasted it into the code tags.

Usually people on help forums have a difficult time helping people that post a whole class and expect us to debug it for them, so tell us, what do you think is wrong with it?

I would ask you to look into the debugging features of your current compiler/ide toolkit.

pseudorandom21 166 Practically a Posting Shark

Taken from:
http://stackoverflow.com/questions/937573/changing-the-useragent-of-the-webbrowser-control-winforms-c

You could try: webBrowser.Navigate("http://localhost/run.php", null, null, "User-Agent: Here Put The User Agent"); Or another of the solutions there.

I just tested that on "http://www.whatbrowseramiusing.co/", it reported "unknown user-agent" but the idea is to use one that is known, like chrome's user-agent or firefawks'.

pseudorandom21 166 Practically a Posting Shark

http://www.cplusplus.com/reference/clibrary/cstdlib/system/ system("dir"); Alternatively you can use the Windows API.
http://msdn.microsoft.com/en-us/library/ee663300(v=VS.85).aspx

pseudorandom21 166 Practically a Posting Shark

http://www.cplusplus.com/reference/clibrary/cctype/

Those are character functions.

Also, I would suggest including the domain of the problem (the alphabet you intend to work with) in the program rather than relying on the character set.

example: std::string alphabet = "abcdefghijklmnopqrstuvwxyz0123456789";

pseudorandom21 166 Practically a Posting Shark

Lame!
I just watched something on the news about the iPhone versions, and I was just thinking "if steve jobs is watching this he would be happy". It seemed to be very Apple-oriented.

pseudorandom21 166 Practically a Posting Shark

Darn, I meant to call them "settings" instead of properties, I was pretty tired that day sorry.

<shrug>

pseudorandom21 166 Practically a Posting Shark

OK I too have felt the pain associated with building and installing boost libraries and I found an installer!

I think of it very highly, http://www.boostpro.com/download/

If you need help setting up a project to use the boost libraries once it's installed please let us know.

pseudorandom21 166 Practically a Posting Shark

There are tons of specialization areas for programmers, you could look into artificial intelligence, or automation to name a couple.

I don't feel this list is complete,
http://www.bibl.u-szeged.hu/afik/compw.html

pseudorandom21 166 Practically a Posting Shark

Yes, I made a website scraping app in C++ once, the "browser" is supposed to send a tag identifying it's self, and as such you can likely fool the website by altering your "user-agent" string.

Oh luckily there is a UserAgent property for the class (woo!)

http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.useragent.aspx

I don't know much more about it, but MSDN also says that class is obsoleted.

pseudorandom21 166 Practically a Posting Shark

If you're using visual studio check the youtube link in my signature to learn to use VS debugging features.

pseudorandom21 166 Practically a Posting Shark

either way you're going to be restricted to discovering for yourself his mistruths unless you really know what he's thinking.

pseudorandom21 166 Practically a Posting Shark

LOL but he's using them as the "reference" and "r-value-reference" operators.

pseudorandom21 166 Practically a Posting Shark

My question was referring to the best way to store these strings, as in, in a text file or as C# properties or some XML-ness that I don't know how to use?

pseudorandom21 166 Practically a Posting Shark

If it's any help I usually tend to use the WebBrowser control for these things, and use the "DocumentCompleted" event handler to work with the read the "Document" property of the WebBrowser.

pseudorandom21 166 Practically a Posting Shark

I have a number of plain text strings that I need to allow a user of my program to change, what is the usual/best way of doing something like this?

I was considering using C# properties for them all (and a "edit properties page") but I'm not sure that's the best solution.

pseudorandom21 166 Practically a Posting Shark

Or see the link in my signature about debuggin (youtube) if you use VS.

pseudorandom21 166 Practically a Posting Shark

Like the crappy video I made? (Link is in my sig.)

pseudorandom21 166 Practically a Posting Shark

There is an example of setting a windows hook in my skydrive (the link in my signature).

Otherwise, I read your whole post and still don't know what you are wanting.

pseudorandom21 166 Practically a Posting Shark

I don't know what you're asking, could you be a little more clear?

pseudorandom21 166 Practically a Posting Shark
pseudorandom21 166 Practically a Posting Shark

totnum[20]/x; That line accesses an element of the array that doesn't exist, it's one past the end of the array because the array is size 20 and indices start at 0.

Also, when you use the subscript operator "[ ]" on the array, you're accessing only one element. You'll need to loop through each element of the array (up to the num. of test items) and add them together, then divide by the number of test items.

pseudorandom21 166 Practically a Posting Shark

Well you could check to see if there is a way built-in to let you do that, otherwise it just may not be possible.

pseudorandom21 166 Practically a Posting Shark

hehe the Visual Studio debugger was made for this sort of thing also, link to youtube video is in my signature if you can stand my horrible voice I show you how to start using it.

pseudorandom21 166 Practically a Posting Shark

void main()

Whatever happened to "int main()" in the 80s anyway?

pseudorandom21 166 Practically a Posting Shark

I just changed all the switch cases to ifs and it worked itself out. If there a normal history of ofstream and switch cases having issues with each other?

If you aren't using scope properly there is.

pseudorandom21 166 Practically a Posting Shark
pseudorandom21 166 Practically a Posting Shark

There is NOT a NULL in that array!

pseudorandom21 166 Practically a Posting Shark

i suppose it shud work, because MYStruct is a type of object, so boxing should work.
can u try that out..?

I haven't been using C# much and it isn't my first language, I don't know how to do it so I was hoping you could show me in a line or two, but ok.

pseudorandom21 166 Practically a Posting Shark

Is it possible with this "boxing" thing I've heard of? Like making it an "object" instance and using that?

pseudorandom21 166 Practically a Posting Shark

See the youtube vid link in my sig. if you're using Visual Studio.
Also, that arrange function is quite large and I recommend breaking it down into smaller pieces where prudent.

pseudorandom21 166 Practically a Posting Shark

Unfortunately if that's part of a compiler's standard library simply copying it for use with your compiler very likely won't work as expected.

I'm sure if you use google you can find some interesting ways to do what you want, there are also probably C++ libraries that aid in this sort of thing--some of which are likely pretty cool.

pseudorandom21 166 Practically a Posting Shark

Hi I have a struct in my form, and I need to pass a reference/handle to it to a separate class, which is ok with the simple "ref" keyword. Now, how do I store this ref to a struct in the class (as a member variable)? Is this possible? I hope so...

pseudorandom21 166 Practically a Posting Shark

I suggest posting it if you can, I'm sure we can help you condense it.

pseudorandom21 166 Practically a Posting Shark

The switch is a primitive form of "if/else" structure, are you trying to use an fstream declared in a case label in another case label?

Here's how I normally use my switch's

switch( condition )
{
   case ONE:
   {
      break;
   }
   case TWO:
   {
      break;
   }
}
pseudorandom21 166 Practically a Posting Shark

I use the following on both of my dual monitors
internet marine cables
That way I know the quickest and least used routs for when I select a free mirror from another country. :)

Win!

pseudorandom21 166 Practically a Posting Shark
pseudorandom21 166 Practically a Posting Shark

I wrote a function that finds the lowest numeric grade score of the pointer array of struct, puts it in the first (0) index position, and then puts the numeric value that was in the first (0) index position in the index position that was formerly occupied by the newly found lowest value.

[3][2][1][0]
[0][2][1][3]
...

Then, it starts at the next highest index position and finds the next lowest value, etc, and swaps it.

[3][2][1][0]
[0][2][1][3]
[0][1][2][3]

So it appears to be algorithmically sound assuming you implement it properly :)

The issue that I'm having is that I can get the numeric scores sorted properly and moved in the function, but I can't get the first and last names in the array to change position, except somewhat unpredictably.

The best advice I have for you is to run your code under a debugger and see for yourself what is happening. If you're using Visual Studio be sure to "start debugging" and set some breakpoints to examine the contents of your variables.
If you don't know what I mean I will make a youtube video of it and link you to it, but who knows when that will be.

pseudorandom21 166 Practically a Posting Shark

I have accepted an internship that involves re-writing a project written in "Clipper Summer of '87" in C#, and basically it's missing a couple source code files and I have no idea how to work with the database files it uses.

I do know it uses something called "dBase III" whatever outdated tech. that might be...

Basically I'm totally stumped on how to work with the existing files, I intend to re-create the functionality of it by having the people using it (a small business in this case) critique the UI design proposals I will be coding in C#.

The problem is it's just such an outdated monstrosity, being a somewhat young college student, I have no idea how to work with it.

Should I alter my approach to this problem? I'm sort of out of ideas, aside form the UI re-write (the original is console based) and then looking through the available code to figure out what it does.

pseudorandom21 166 Practically a Posting Shark

Got any wallpapers worth posting?

pseudorandom21 166 Practically a Posting Shark
if ( condition )
{

}

Maybe?

pseudorandom21 166 Practically a Posting Shark

Of course there are other ways to do file IO, namely the underlying Operating System API (which is the Windows API in this case).

If you do intend to work with it, please try to develop good coding strategies soon or it will become very convoluted as the API is pure C.

http://msdn.microsoft.com/en-us/library/aa363858(VS.85).aspx

I would wager the OS API is more powerful than the C++ std lib, but I may be wrong and they are equal.

pseudorandom21 166 Practically a Posting Shark

I don't know how 7zip makes those.
Visual Studio does provide a type of installer project though.

XOR encryption:
http://en.wikipedia.org/wiki/XOR_cipher

Zssffssz commented: Try's his hardest. +2
pseudorandom21 166 Practically a Posting Shark

MAN thats that's the third time today that my IPod deleted my post. Ok here's the run through: Theexample of what I want to do: I have a .obj I want to email to someone but my comp doesnt have Internet so I email it from another one but it's a vista comp and it's gona nag me so much about how .objs are system files (xp already does) so I put it in a .exe and every body's happy! When I run the exe the obj will come out this is not my senario just think it sounds cool your code was confusing and is there any way to use ofstream and ifstream for this sorry about sounding rude and fast I hate retyping things

I don't think this is the best solution to the problem, but then again without installing third-party software it may be..
Usually .exe is more restricted than .obj though.

Solution 1. Rename the .obj file.

If that doesn't work you may need to encrypt it, which you can write an application to do (it just needs to obfuscate it somehow and then transform it back to the original).

Normally this is done via renaming the file, then archiving it with a password (using third party software like winrar or peazip). This will prevent determining the type of file from it's data and file name.

Solution 2. What you have proposed, basically the example uses Windows API functions necessary to …

pseudorandom21 166 Practically a Posting Shark

Might be worth noting the Micorosft example uses MAKEINTRESOURCE instead of casting to a char pointer.

PlaySound(
MAKEINTRESOURCE(IDR_WAVE1),
GetModuleHandle(NULL),
SND_RESOURCE);

pseudorandom21 166 Practically a Posting Shark

In visual studio you right click in the solution explorer and select "Add->Resource"
and then you click "Import" and select the path to your resource, after which you must name your new resource type.

Afterward something like this is in order:

#include "stdafx.h"


int _tmain(int argc, _TCHAR* argv[])
{
	//http://msdn.microsoft.com/en-us/library/ms648042(v=VS.85).aspx
	HRSRC hRes = FindResourceA(NULL,MAKEINTRESOURCEA(IDR_EXECUTABLE1),"Executable");
	assert(hRes != NULL);
	
	//http://msdn.microsoft.com/en-us/library/ms648046(VS.85).aspx
	HGLOBAL res = LoadResource(NULL, hRes);
	assert(res != NULL);

	//Obtain a pointer to the first byte of the resource.
	//MSDN Quote:
	/*
	Note  LockResource does not actually lock memory; it is just used to obtain a pointer to the memory containing the resource 
	data. The name of the function comes from versions prior to Windows XP, when it was used to lock a global memory block 
	allocated by LoadResource.
	*/
	//http://msdn.microsoft.com/en-us/library/ms648047(v=VS.85).aspx
	LPVOID pRes = LockResource(res);
	assert(pRes != NULL);

	//http://msdn.microsoft.com/en-us/library/ms648048(v=VS.85).aspx
	DWORD resourceSize = SizeofResource(NULL, hRes);
	assert(resourceSize != 0);

	//Write file to disk.
	std::cout << "The resource file size is " << resourceSize << " bytes." << std::endl;
	std::cout << "Writing file to current working directory:\n \"";
	char pDir[MAX_PATH];
	GetCurrentDirectoryA(MAX_PATH,pDir);
	std::cout << pDir << "\""<< std::endl;

	std::ofstream outFile("Executable.exe",std::ios::binary);
	outFile.write((const char *)pRes, resourceSize);
	outFile.close();

	std::cin.get();
	return 0;
}