5,676 Posted Topics

Member Avatar for Lostelf
Member Avatar for rithish
0
381
Member Avatar for valestrom
Member Avatar for BlitzX

>I'm reading directly from the disk, so I guess I have to use ReadFile(); Why? What does `ReadFile()` do that any other read technique doesn't do? To alleviate your real problem, make your buffer larger than 512 -- say 16 more. Always read into the last 512 of that buffer, …

Member Avatar for BlitzX
0
123
Member Avatar for silvercats

1st: Store the password in a file. Read it in for the compare. 2nd: For more security, encrypt the password somehow. Decrypt it before comparing.

Member Avatar for WaltP
0
2K
Member Avatar for triumphost

Yes, ASM can be very useful. If you need to rewrite a function because its too slow, ASM can make it quite a bit faster. If you need to interface with a module of some kind and C++ is too clumsy to do the interface, ASM to the rescue. Drivers …

Member Avatar for DeanMSands3
0
165
Member Avatar for armydad1

Store them in an array and when done output the array starting from the last input.

Member Avatar for -VLV-
0
213
Member Avatar for dlmagers

That's assuming a selection structure means a switch statement. Since we don't know the context of your terms, it's hard to say with accuracy.

Member Avatar for MasterHacker110
0
226
Member Avatar for MasterHacker110

The closest is a character array: char *name = "Jody"; // create a pointer pointing to the name of 5 chars char name2[] = "Mary"; // create an array of 5 chars to hold the name char name3[20]= "Janine"; // create an array of 20 chars to hold the name …

Member Avatar for MasterHacker110
0
3K
Member Avatar for priya.chitroda

> the thing I am confused is already been corrected but then I am stuck as I have no clue how to continue coding? And this is supposed to give us the information we need to help you? Think about actually asking a question we can answer.

Member Avatar for WaltP
0
242
Member Avatar for Qonquest

> for (i = srclen, j = 0; i < srclen && j < dstlen; i++, j++) If **i** starts as **srclen** when will `i < srclen` be true? What happens to your loop in this case? IMO, you need one more index value. Since you have **srclen** and **dstlen** …

Member Avatar for deceptikon
0
1K
Member Avatar for joey_r

I don't see anything wrong with any *line 18*. When asking for help, you need to give details. What is the problem you see? You gave us a line, but is it the same line in the post? If not, use the numbers in the post.

Member Avatar for WaltP
0
119
Member Avatar for hackit

Can't read the code because of lack of [formatting](http://www.gidnetwork.com/b-38.html). Try again.

Member Avatar for lil_bit
0
396
Member Avatar for salohcin

First: Learn to [format](http://www.gidnetwork.com/b-38.html) your code consitently. It's difficult to follow. Second: [feof()](http://www.gidnetwork.com/b-58.html) is used incorrectly. Third: [system("pause")](http://www.gidnetwork.com/b-43.html) is not a good way to pause a program. Last: [scanf("%s",&text);](http://www.gidnetwork.com/b-62.html) is dangerous. `fgets()` is much safer. Since you didn't explain what you are trying to do beyond reading and writing the …

Member Avatar for salohcin
0
211
Member Avatar for triumphost

>I looked up the format but it looks nothing like a bitmap... Why should it look like a bitmap? It's a PNG format. >... and I read the GDI doesn't support PNG's. So how does LibPNG do it then? By not using GDI I suppose. Since it's called *LibPNG*, it …

Member Avatar for DeanMSands3
0
310
Member Avatar for mpyap

Try [these](http://www.cplusplus.com/reference/iostream/manipulators/) for your formatting needs.

Member Avatar for L7Sqr
0
728
Member Avatar for stevelance99

>My guess is that codepad.org is breaking when it gets to cin >> input--it looks like the site doesn't do interactive input. >If you want to make it work there, replace any cin lines with string literals. You'll also probably run into problems with system("pause"). If the site doesn't do …

Member Avatar for gusano79
0
194
Member Avatar for stevelance99

>hey can anyone help me with the decrypt part...cant seem to get it to work.... Since you didn't bother to give us any information at all, all "I can say is figure out why it doesn't work and fix it..." Give us some details on what it does wrong and …

Member Avatar for WaltP
0
402
Member Avatar for shanki himanshu

> `#define FOR(i,a,b) for(int i=a;i<b;i++)` Why? What's wrong with just using the `for` statement? Making it a define simply makes the program confusing.

Member Avatar for shanki himanshu
0
100
Member Avatar for juljan30

When asking for help, **EXPLAIN** what problem you are having. Do **not** expect us to try to figure out what it does wrong -- tell us!

Member Avatar for WaltP
0
858
Member Avatar for juljan30

When asking for help, **EXPLAIN** what problem you are having. Do **not** expect us to try to figure out what it does wrong -- tell us! And put **only** the code in CODE Tags -- not the entire post.

Member Avatar for WaltP
0
126
Member Avatar for juljan30

When asking for help, **EXPLAIN** what problem you are having. Do **not** expect us to try to figure out what it does wrong -- tell us!

Member Avatar for WaltP
0
190
Member Avatar for juljan30

When asking for help, **EXPLAIN** what problem you are having. Do **not** expect us to try to figure out what it does wrong -- tell us!

Member Avatar for WaltP
0
133
Member Avatar for adityasingh95

Look up again how to use a character array as a **string**. You are missing a couple key pieces of information about a string's length and termination character.

Member Avatar for rubberman
0
140
Member Avatar for sandeepalankar

> Why is Dani Web so agitated when people ask a question? This person didnt understand something they came across and decided to post here to better understand it. Because based on the first post it is just another request to do his homework for him. He didn't ask for …

Member Avatar for WaltP
0
180
Member Avatar for gem.gonzales.9

> end_do_while Since there is no `do_while` a simple `end_do` would be clearer. ;-)

Member Avatar for WaltP
0
160
Member Avatar for rdx05

> Also don't use #include <conio.h> and getch() because they are really really bad. Read *bad* as non-standard and prone to cause problems for you when you start using one of the 99% of the compilers that don't know what `<conio.h>` and `getch()` are. The standard definition of *bad* doesn't …

Member Avatar for rdx05
0
207
Member Avatar for mrgadgets
Member Avatar for rdx05
Member Avatar for WolfShield

[QUOTE=vegaseat;]A Politically Correct Christmas Greeting: Best wishes for an environmentally conscious, socially responsible, low stress, non-addictive, gender neutral, winter solstice holiday, practiced within the most joyous traditions of the religious persuasion of your choice, but with respect for the religious persuasion of others who choose to practice their own religion …

Member Avatar for itzarun
0
1K
Member Avatar for poloblue

Problem #1: Never **ever** put code or variable definitions in a header file. Header files are used to *declare* functions and variables, not *define* them. Problem #2: void showList(const int list[], const int n) { cout<<"The list is ..... " <<endl; for (int i=0; i<n; i++) { cout<<setw(8)<<right<<list[i]; if ((i+1)%1000==0) …

Member Avatar for poloblue
0
330
Member Avatar for learner_new

It's a *pointer* that points to a *pointer* that points to a *char* As for how it works, work it out. Draw a map of memory and see how it could possibly be layed out and used.

Member Avatar for NathanOliver
0
6K
Member Avatar for WaltP

This is more of a rhetorical question, but... ... how is the article [Flame on: complex LUA and C++ cyber weapon fired at Israel, Iran and Syria](http://www.daniweb.com/software-development/news/424377/flame-on-complex-lua-and-c-cyber-weapon-fired-at-israel-iran-and-syria) related to [C: Access violation 0xC0000005:](http://www.daniweb.com/software-development/c/threads/427477/c-access-violation-0xc0000005#post1829060)???

Member Avatar for happygeek
0
107
Member Avatar for BHKK

1) It's **crAsh**, not crUsh. 2) [See this](http://www.gidnetwork.com/b-57.html). Your use is undefined. 3) Be consistant in your formatting. [See this](http://www.gidnetwork.com/b-38.html)

Member Avatar for BHKK
0
604
Member Avatar for eskavvas

> My program thus far is not working out... Why is it no one likes to explain *what* the code does wrong and expects us to figure it out for ourselves?

Member Avatar for eskavvas
0
182
Member Avatar for poloblue

> Write the pseudocode to find the record with a specific studentID Well, do what the instructions say. If you have a list of numbers, how would **you** find a specific number? Assume each number is on 1 index card in a file box. Write down each step (the psuedocode) …

Member Avatar for NathanOliver
0
280
Member Avatar for aasi007onfire

Only [B]Ancient Dragon[/B] has the correct answer. You cannot ++ or -- the same variable in the same statement. The C Standard says doing so is undefined and not guaranteed to give the answer you expect. See [url=http://c-faq.com/expr/evalorder2.html]this[/url] and [url=http://c-faq.com/expr/ieqiplusplus.html]this[/url].

Member Avatar for deceptikon
0
278
Member Avatar for triumphost

If you don't understand what you are writing, you should not be writing code. You need to sit at a desk with pencil and paper and plan -- yes plan -- what you need to accomplish. Write down what the task is. Break that description into pieces -- like in …

Member Avatar for Lucaci Andrew
0
107
Member Avatar for on93

[DO](https://www.google.com/search?q=definition%3A+do&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a)

Member Avatar for Lucaci Andrew
0
293
Member Avatar for кодирование
Member Avatar for georgeduroa
0
175
Member Avatar for WaltP

Why can't I post a response without making it code? There is no code at all in a response I made and I cannot get it posted because I recieve the error: >If posting a code snippet, use the Code button in the editor toolbar >The code snippet in your …

Member Avatar for Dani
0
241
Member Avatar for jnawrocki

Code Snippets should not use anything in `conio.h`. They should be written so anyone can comple the program.

Member Avatar for jnawrocki
0
278
Member Avatar for new_developer

>A much simpler way, if this concatenation is just part of a much bigger program, is to use atoi and itoa. itoa() the two numbers, then strcat(), then atoi() back. **atoi()** is simpler than (x1\*10) + x2? How do you figure that? Please explain... And [itoa()](http://www.cplusplus.com/reference/clibrary/cstdlib/itoa/) is not generally available …

Member Avatar for TrustyTony
0
14K
Member Avatar for Albino

To make your code more readable, look at how **pyTony** wrote the subscripte value. I'm all for using SPACEs, but too many also make code hard to read.

Member Avatar for Albino
0
366
Member Avatar for Sendy Hipo

>erm, whats wrong with my code? anyone can tell? erm, not if you don't tell us where the errors are...

Member Avatar for Sendy Hipo
0
710
Member Avatar for idomarko

Look at string functions left$(), right$(), len() Use s FOR loop over the string read in.

Member Avatar for ChrisPadgham
0
319
Member Avatar for schlulol

Not a clue what you don't understand. A MIN and MAX are quite obvious so without knowing what bugs you, we can't very well answer your non-question.

Member Avatar for m4ster_r0shi
0
316
Member Avatar for Rouf mir
Member Avatar for khuzdaar
Member Avatar for faraz ahmad
0
1K
Member Avatar for Dudearoo

Print your code. Sit at a desk with a pencil and the code. Write down the names of each variable in a column. Go through the code line by line changing the variable values as you go. Follow the loop until it exits. This is the easiest way to figure …

Member Avatar for Dudearoo
0
353
Member Avatar for lotusdream

>Hi everyone,I'm tryind to do something about sound on linux.I basically record some sound and try to encyrpt it using algorithm.However,I encountered some sort of pointer problem.Both RSA algorithm and recording&listenin sound works properly. - - - Basically,Rsa works with ascii array which includes char's of my word and encyrpt/decyrpt …

Member Avatar for Schol-R-LEA
0
392

The End.