68 Posted Topics

Member Avatar for sasaB
Member Avatar for prodam

Second jwenting. I recommend learning java instead of visual basic, also because Microsoft has stated that VB won't be supported in the future.

Member Avatar for strmstn
0
78
Member Avatar for xcarbonx

Maybe you could allocate an array and pass it together with an int telling the size of the array?

Member Avatar for strmstn
0
113
Member Avatar for empror9

You probably want to use string variables. You can do that with either a char pointer or a string class. As such: [CODE] #include <iostream> #include <string> // Header for string class. using namespace std; int main() { char *str = "--------"; string str_ = str; cout << str << …

Member Avatar for strmstn
0
145
Member Avatar for farvahar_mr
Member Avatar for Bigojac2000

That is just an assignment. How far have you gotten? Any thoughts on how to solve the exercise?

Member Avatar for strmstn
0
282
Member Avatar for chinmayi

My guess is also that a pointer to a struct would be faster when passed as a function parameter, instead of copying the whole structure. For example: When c code is translated into assembly; Passing a whole struct as a parameter would force the program to store all values on …

Member Avatar for strmstn
0
131
Member Avatar for jigglymig1

Are you sure your file isn't saved with carriage-return linefeeds, '\r\n' instead of just '\n'?

Member Avatar for Salem
0
97
Member Avatar for ajjg123

To find two factors you could do modulo with a variable that is incremented until the rest is 0.

Member Avatar for Lerner
0
147
Member Avatar for HelloMe
Member Avatar for MyrtleTurtle
0
84
Member Avatar for invisal

[QUOTE=jwenting;1151113]by simply installing a decent commercially available virus scanner.[/QUOTE] That wasn't any answer to the question however. Have you looked through the shell commands on msdn?

Member Avatar for strmstn
0
133
Member Avatar for tyke17
Member Avatar for empror9

[QUOTE=empror9;1150857]if he\she press 'w' so the hero must move up, the qustion how to do this by using loop?[/QUOTE] How about this? Getting the user input and then doing whatever required to move using a switch()? [CODE]bool doMore = true; char input; while(doMore) { cout << "Choose direction: "; cin …

Member Avatar for empror9
0
159
Member Avatar for fallendream
Member Avatar for macman101

Why not use the string class? [CODE]for(unsigned i=0; i<str.length(); i++){ switch(str[i]) { case ' ': str.erase(i, 1); break; default: break; } }[/CODE] This way it's easy to remove custom characters. Of course, when copying the characters into another string/array it's simple to apply toupper() or tolower(). Or you could include …

Member Avatar for lotrsimp12345
0
165
Member Avatar for vanillaboy

40 MHz is 40 million times per second. I'm not sure but would that mean you'd need to put 1/40M? About on/off, I've learned that it is a negative flank that triggers the interrupt, depending on the hardware it should be taken care of automatically. But I have only worked …

Member Avatar for strmstn
0
126
Member Avatar for squarey
Re: argv

As Lerner said. Check argc first, going further than argv[argc-1] will cause a segmentation fault.

Member Avatar for strmstn
0
69
Member Avatar for blamp

When filling out a number in order for it not to lose its sign you'll have to use the most significant bit. For example: 0100 -> 00000100, 1010 -> 11111010. Notice though, that this only concerns signed numbers.

Member Avatar for strmstn
0
141

The End.