Search Results

Showing results 1 to 40 of 332
Search took 0.02 seconds.
Search: Posts Made By: skatamatic ; Forum: C++ and child forums
Forum: C++ Jun 2nd, 2009
Replies: 13
Views: 913
Posted By skatamatic
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: 2,052
Posted By skatamatic
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: 2,052
Posted By skatamatic
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: 502
Posted By skatamatic
I would sugguest attending class.
Forum: C++ Apr 28th, 2009
Replies: 35
Views: 2,052
Posted By skatamatic
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: 387
Posted By skatamatic
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,724
Posted By skatamatic
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: 304
Posted By skatamatic
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: 889
Posted By skatamatic
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: 628
Posted By skatamatic
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: 340
Posted By skatamatic
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,390
Posted By skatamatic
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: 443
Posted By skatamatic
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: 443
Posted By skatamatic
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: C++ Apr 3rd, 2009
Replies: 19
Views: 1,916
Posted By skatamatic
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,916
Posted By skatamatic
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: 232
Posted By skatamatic
??? 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: 232
Posted By skatamatic
Google It? (http://tinyurl.com/dhssuz)
Forum: C++ Mar 23rd, 2009
Replies: 13
Views: 714
Posted By skatamatic
lol? You never even posted problem to begin with.
Forum: C++ Mar 14th, 2009
Replies: 6
Views: 382
Posted By skatamatic
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: 6
Views: 382
Posted By skatamatic
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: C++ Mar 6th, 2009
Replies: 18
Solved: PLS. READ
Views: 692
Posted By skatamatic
Did you just say you chat raped me? That's a little obscure.
Forum: C++ Mar 5th, 2009
Replies: 4
Views: 305
Posted By skatamatic
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 &&...
Forum: C++ Mar 5th, 2009
Replies: 6
Views: 700
Posted By skatamatic
I don't understand why your are interchanging null terminated c style strings with the String class. The string class alone should suffice here and it handles its own memory (and also contains an...
Forum: C++ Mar 2nd, 2009
Replies: 4
Views: 2,152
Posted By skatamatic
If it's a double linked-list it would make finding items past the half-way node more efficient,if you knew you where specifically looking at the end of the list, but finding an item in the middle...
Forum: C++ Mar 2nd, 2009
Replies: 22
Views: 1,038
Posted By skatamatic
I think he means a min-max tree concept, where the starting node would be the starting position, each leaf would be a possible place to move to, which would leaf out also into further possible paths...
Forum: C++ Mar 2nd, 2009
Replies: 4
Views: 454
Posted By skatamatic
Yeah if you want to work on macros that's one thing, but if you only want to accomplish the goal of auto-filling web forms then yeah you should really create a whole system with an XML file (or even...
Forum: C++ Mar 2nd, 2009
Replies: 18
Solved: PLS. READ
Views: 692
Posted By skatamatic
Hey thrashing the thrashers is just as hypocritical as hating all racists.
Forum: C++ Mar 2nd, 2009
Replies: 22
Views: 1,038
Posted By skatamatic
I think i may understand your problem. You have a grid (not a function) where points can be all over the place , and you need to find the shortest path. Sorry for misunderstanding. I will think up...
Forum: C++ Mar 2nd, 2009
Replies: 22
Views: 1,038
Posted By skatamatic
That really isn't anymore descriptive. If all nodes must be passed, then there is no shortest cycle, they will always be the same, unless your definition of cycle is different than mine. Mine is:...
Forum: C++ Mar 2nd, 2009
Replies: 22
Views: 1,038
Posted By skatamatic
What do you mean the shortest cycle? What makes a cycle? I imagined you where iterating through each point, making sure that the next x is greater than the current, which is essentially just...
Forum: C++ Mar 2nd, 2009
Replies: 4
Views: 2,152
Posted By skatamatic
Linked lists are always the slower option, as all items must be iterated to find the end. A well written hash table or binary map will give you the speed you seem to be looking for.
Forum: C++ Mar 2nd, 2009
Replies: 5
Views: 298
Posted By skatamatic
Ahh yes that makes sense. Not too sure why you would need to do something like this, could you post the context of your problem?
Forum: C++ Mar 2nd, 2009
Replies: 18
Solved: PLS. READ
Views: 692
Posted By skatamatic
Use a for loop. And show some freakin effort!
Forum: C++ Mar 2nd, 2009
Replies: 3
Views: 369
Posted By skatamatic
You will also probably want to send the size of the array, unless you plan on writing an algorithm to look for the null terminator.
Forum: C++ Mar 2nd, 2009
Replies: 5
Views: 298
Posted By skatamatic
Wouldn't you just end up with this then?
a.b->a.b->a.b->a.b to the end of the universe?
Forum: C++ Mar 2nd, 2009
Replies: 4
Views: 454
Posted By skatamatic
Ummm. I have no idea what you are trying to do. And I don't think that all those mouse events are relevant to the problem, and should probably not be included for clarity. Are you trying to write...
Forum: C++ Mar 2nd, 2009
Replies: 22
Views: 1,038
Posted By skatamatic
#include <vector>
#include <algorithm>
struct Point
{
public int _iX, _iY;
Point(int x, int y)
{
_iX = x;
_iY = y;
}
Forum: C++ Mar 2nd, 2009
Replies: 5
Views: 381
Posted By skatamatic
here's a brute force template

for (int i = 0; i < MAX_NUMBER; i++)
{
if (Condition[i] == Desirable)
DoFunction();
else
DoOtherFunction();
}
Forum: C++ Jan 27th, 2009
Replies: 8
Views: 650
Posted By skatamatic
I disagree with rashakil. Using pointers properly can greatly increase the efficiency and speed of your code. Just compare C++ to C#. C++ programs run much much faster than C#, because C# doesn't...
Showing results 1 to 40 of 332

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC