Forum: C# Jun 9th, 2009 |
| Replies: 8 Views: 287 Well it turns out my prediction was pretty much right... And at least I let him know I'm no expert in that area, but at least I offered what I know to help. |
Forum: C# Jun 9th, 2009 |
| Replies: 8 Views: 287 I'm not too sure about the C# console as I only use C# for windows apps and as code-behind in an ASP web apps. But perhaps it is returning a character array, which when cast to an int causes some... |
Forum: C# Jun 9th, 2009 |
| Replies: 8 Views: 287 I am not too sure what the actual question is, nor do I have time to look through all that code and decide what you may be having problems with. I'm not too sure what you are confused with regarding... |
Forum: C# Jun 2nd, 2009 |
| Replies: 12 Views: 747 Here's a quick, simple solution:
//assume iArray is an array of numbers, and ARRAY_SIZE is the size of it
int iFind = 2; //the number to look for repetitions of
int iCurrent = 0;
int iCount =... |
Forum: C# Jun 2nd, 2009 |
| Replies: 11 Views: 802 Sockets can be a bit challenging of a concept at first, mostly because in order to make an asynchonous connection, a certain degree of multi-threading must be used. The socket class will handle the... |
Forum: C++ Jun 2nd, 2009 |
| Replies: 13 Views: 845 To make it a more secure method, you could do a binary write to the file with the time of day (in clock ticks) that the file was written, the number of guesses that occured, and a strange binary... |
Forum: C++ Apr 28th, 2009 |
| Replies: 35 Views: 1,856 This would require a data aquisition card, an instrumentational amplifier attached to a very sensitive inductor, and amplified so that the minute changes in electrical forces in the air generate a... |
Forum: C++ Apr 28th, 2009 |
| Replies: 35 Views: 1,856 Umm...What point was made, exactly, with that post?
and kelechi96,
don't get discouraged too much, some of the people around here can be a little ignorant at times, but will usually help you out... |
Forum: C++ Apr 28th, 2009 |
| Replies: 11 Views: 467 I would sugguest attending class. |
Forum: C++ Apr 28th, 2009 |
| Replies: 35 Views: 1,856 An example of this would be to measure the amount of electrical energy in the air at any given point using some sort of analog device, which then converts this into a voltage difference, which is... |
Forum: C++ Apr 24th, 2009 |
| Replies: 1 Views: 332 Do you have to use sscanf? That's a bit outdated and not generally used, and MSC++ throws a bunch of warnings when you use it. I sugguest using string datatype with operator+()
Usage:
... |
Forum: C++ Apr 24th, 2009 |
| Replies: 25 Views: 1,531 Your function makes little to no sense to me. Just think about injecting test values into it. Say you pass it 5, base 10:
5 / 10 = 0.5 = 0 (int)
"0123456789abcdef"[0 % 10] = '0'
Well damn. ... |
Forum: C++ Apr 24th, 2009 |
| Replies: 4 Views: 278 std::cout << "What did you get on this assigment? ";
std::cin >> iMark;
if (iMark == 0)
return false;
else
return true; |
Forum: C++ Apr 24th, 2009 |
| Replies: 2 Views: 722 Hmmm seems like you need to bust out the math book. I honestly dont remember the math functions in CMath, but you should probably look it up. I also don't know how the library you are using... |
Forum: C++ Apr 24th, 2009 |
| Replies: 8 Views: 563 Wow that is just too painful to read. Curly brackets all over the place. Fix it up a bit please. |
Forum: C++ Apr 24th, 2009 |
| Replies: 4 Views: 292 Hmm I'm not to familiar with that command, but it could have something to do with Vistas rediculous overhead such as data execution prevention or some other security 'feature' |
Forum: C++ Apr 24th, 2009 |
| Replies: 46 Views: 2,163 Usually people that code in C++ don't want things done for them that they don't have control over. If you really want something that nulls and deletes a pointer, write it yourself.
As for a... |
Forum: C++ Apr 24th, 2009 |
| Replies: 4 Views: 371 Simple sentinel loop:
cin >> x;
while (cin.fail() || cin.rdbuf()->in_avail() > 2)
{
cin.ignore(cin.rdbuf()->in_avail());
cin.clear();
cout << "Invalid input\n";
cin >> x; |
Forum: C++ Apr 24th, 2009 |
| Replies: 4 Views: 371 I think the main problem with your loop is...you don't have a loop.
Also...when checking the value of a bool it is better practice to either compare it to a bool value or just the actual bool... |
Forum: Game Development Apr 15th, 2009 |
| Replies: 5 Views: 660 Well, if you choose to use an array, you need to determine how much memory a point/edge/poly occupies, and also how much memory you want your program to consume.
I may be wrong, but using an array... |
Forum: C++ Apr 3rd, 2009 |
| Replies: 19 Views: 1,514 Oops. You also need to put an empty cin.get() after that line:
cin.ignore(cin.rdbuf()->in_avail());
cin.get();
return 0;
The first line flushes the input buffer, so that it doesn't cause... |
Forum: C++ Apr 3rd, 2009 |
| Replies: 19 Views: 1,514 Well as for the actual palindrome detecting algorithm, I don't think your code will work. Instead, I think you need to use deques of chars. I'm not all that comfortable with deques, I've maybe used... |
Forum: C++ Mar 24th, 2009 |
| Replies: 4 Views: 216 ??? He was asking you a question relating to your problem. Albeit a bit rudely, it would probably be best (for your sake) to answer his question. You need to be more clear when asking questions in... |
Forum: C++ Mar 23rd, 2009 |
| Replies: 4 Views: 216 Google It? (http://tinyurl.com/dhssuz) |
Forum: C++ Mar 23rd, 2009 |
| Replies: 13 Views: 680 lol? You never even posted problem to begin with. |
Forum: C# Mar 20th, 2009 |
| Replies: 1 Views: 439 That is...incredibly specific. You'll have much better chances contacting the manufacturer. As for the actual printing, here's some snippets from a barcode assignment i did a while back. In no... |
Forum: C# Mar 20th, 2009 |
| Replies: 6 Views: 2,536 |
Forum: C# Mar 20th, 2009 |
| Replies: 9 Views: 4,053 You can't expect your code to do things you don't tell it to do. If you need to remember things, it will need to be saved to some form of media. The simplest form of this would be a textfile. ... |
Forum: C# Mar 20th, 2009 |
| Replies: 7 Views: 467 lol. So you DO have ideas? You just don't understand the content? |
Forum: C# Mar 20th, 2009 |
| Replies: 2 Views: 759 I dont think that vb would compile. Each if is lacking an endif, which makes reading it pretty difficult. Also, i have no idea what linebuffer is or ConnID - I'm assuming ConnID is a reference to... |
Forum: C# Mar 20th, 2009 |
| Replies: 2 Views: 469 Try passing the string by reference. In this case, just do this:
private void Combobox1_SelectedIndexChanged(object sender, EventArgs e)
{
runstylize(lCombobox1, ref... |
Forum: C# Mar 20th, 2009 |
| Replies: 3 Views: 2,080 You will have to read in the file in binary mode, which means you will have to know which object(s) the file contains so that it can be dumped into the proper class/datatype. |
Forum: C# Mar 20th, 2009 |
| Replies: 2 Views: 605 Is this for a website of yours? Or just in general? If it is yours, then when you run the script for loggon (probably php) have the script update a file with an incremented number of users, and... |
Forum: C# Mar 18th, 2009 |
| Replies: 0 Views: 276 Hi, I'm working on a client-server game app involving asyncronous recieving and syncronous sending. Every time a key state changes, the client is to send a state frame to the server. The problem... |
Forum: C++ Mar 14th, 2009 |
| Replies: 6 Views: 355 Are you trying to teach yourself c++? If so you need to find a very basic guide that takes you down to the fundamentals of the language to start constucting your knowledge foundation upon. Learn... |
Forum: C# Mar 13th, 2009 |
| Replies: 1 Views: 1,652 Google it (http://tinyurl.com/aw9rhj) |
Forum: C++ Mar 13th, 2009 |
| Replies: 6 Views: 355 What do you mean to update it in the main form? You need to insantiate your class in the main form, and have a member function in the class which will return data to main. An alternative to this is... |
Forum: Windows tips 'n' tweaks Mar 12th, 2009 |
| Replies: 9 Views: 1,268 Well i imagine that a slow computer can be attributed to a bottleneck in the default software clock speeds. But I don't think this is the norm, and usually most computers are bottlenecked by their... |
Forum: C++ Mar 6th, 2009 |
| Replies: 18 Views: 655 Did you just say you chat raped me? That's a little obscure. |
Forum: C++ Mar 5th, 2009 |
| Replies: 4 Views: 287 For loops are designed mainly for integer incrementation. They support other datatypes, but this will often result in confusing problems like this. Instead, use a while loop.
while (i!=NULL &&... |