5,676 Posted Topics

Member Avatar for Doogledude123

Well, you *could* post there and just see how good or bad it really is. Consider it a live test of your thoery that it needs to be split and show the DW designers that the current design is flawed.

Member Avatar for ~s.o.s~
0
253
Member Avatar for AutoPython

Look more closely at **("test\\" (variable+".txt").c_str() )**. You are missing something. It's usually better to create complex strings in pieces rather than all in one line like this. Once you get the string generated properly, *then* start combining the terms.

Member Avatar for AutoPython
0
4K
Member Avatar for nitin1

> So, Please make it more active and please reply on my post over there now to start from now only ;) So please, if you want it more active, post there. We aren't going to hire people just to post there so it can be more active for you. …

Member Avatar for nitin1
0
165
Member Avatar for Geli19

Of course it's giving the same seed. `time(0)` returns the current second. So, unless each call to `srand()` if over 1 second apart, the seeds are identical, giving identical random values.

Member Avatar for Geli19
0
5K
Member Avatar for TimLloyd31

> Bob: you'll need to sort the values yourself and find the largest. > > Bob: A simple (though relatively inefficient) sorting routine is the bubblesort, so if you search for examples, that would get you started. > > iamthwee: You will need a loop > > iamthwee: Then you …

Member Avatar for np complete
0
2K
Member Avatar for Jaypie
Member Avatar for straylight

It's only 7 integers, so sorting is an extra added complexity. It *is* a good way, but if you can't find duplicates, you'll get lost in the sort. Write down 7 numbers randomly on a piece of paper -- making sure to have one duplicate. Now, looking at 2 numbers …

Member Avatar for straylight
0
209
Member Avatar for silvercats
Member Avatar for lim9I

> Execution starts from main(), are you allowed to include main() as a member function of a class ? May be I'm wrong. No you are not. `main()` cannot be part of the class. It must stand alone. And `void main()` is wrong. It's `int main()` -- and always has …

Member Avatar for rubberman
0
229
Member Avatar for 45lbplates

Did you actually look up the *erase* and *remove* methods of the string class? I'll bet their description would help you determine how and why and which to use.

Member Avatar for vijayan121
0
5K
Member Avatar for poloblue

> NathanOliver: And what seems to be the problem? It is asking a lot to give us 600 lines of code and not say what problem you are having with it. > >> poloblue: I'm problems with the studentType header file in this function: Did you miss the part of …

Member Avatar for deceptikon
0
197
Member Avatar for queos

Please use *consisent* [formatting](http://www.gidnetwork.com/b-38.html) so we can read the code easier... `return (sales1, sales2, sales3, sales4);` Illegal format. Look up the return statement again... > ... but it does not do the calculation and display the output Meaning what? Nothing gets output? Bad information? Crashes? When asking for help **ALWAYS** …

Member Avatar for Bob
0
136
Member Avatar for Dudearoo

Search for the string. Add the length of the string to the location found Start printing. If you want a better description, give us more information about your situation.

Member Avatar for Suzie999
0
246
Member Avatar for sona123456

Use a loop to calculate successive values of the functions. Use those values to place a point in your output. As for magic++, I've never used it.

Member Avatar for np complete
0
139
Member Avatar for loshan.moonsamy

Problem #1: you claim you're struggling with this code. Problem #2: you give no indication what the struggle is Problem #3: we are not psychic so have no idea what the struggle is Solution#1: read the post at the top of the forum titled "*Read This Before Posting A Question*" …

Member Avatar for np complete
0
172
Member Avatar for xIXZeroIXx

In *normal* syntax, optional values are surrounded with **[ ]**, required are not. And, for this discussion, **#** will designate one or more SPACEs/TABs. What I understand then is you can have the following: [Label] **#** Instruction **#** number1,number2 **#** [; comment] So: A *label* cannot be preceeded by **#** …

Member Avatar for WaltP
0
560
Member Avatar for ckchaudhary

We really can't get hung up on pos/neg votes. Over the past month I've been downvoted for 1) reversing my stance and stating I now understand a situation and agree with the decision [here](http://www.daniweb.com/posts/jump/1857723) 2) answering questions that help the user [here](http://www.daniweb.com/posts/jump/1833463) 3) explaining the details of a problem and …

Member Avatar for ckchaudhary
0
183
Member Avatar for narendharg
Member Avatar for r0vanz01
Member Avatar for np complete
0
714
Member Avatar for nitin1

Consider `sizeof` to be similar to `#define`. It is created during compile, not while running. From http://en.wikipedia.org/wiki/Sizeof#Implementation "*In most cases, sizeof is a compile-time operator, which means that during compilation sizeof expressions get replaced by constant result-values."* So you can't write one. You can only write *run-time* code.

Member Avatar for deceptikon
0
169
Member Avatar for Secone

Then we obviously need more context. Like the function(s) that call this one, the one that opens the file, and the first few lines of the file. And an **exact** descripton of what's going wrong with as much detail as you can provide.

Member Avatar for Secone
0
167
Member Avatar for gerbil

> It used to be a connotation that it was a gay colour (Lesbian?) It's also a connotation of Royalty. Guess which was first :) I thought lavender was gay. Good thing this isn't BruciWeb... ;)

Member Avatar for happygeek
0
294
Member Avatar for chezderon
Member Avatar for I_m_rude

Since this has nothing to do with C it should be posted elsewhere. Like Geeks Lounge.

Member Avatar for nitin1
3
295
Member Avatar for RozenKristal

Why are you using command line parameters (`argc/argv`) for this? Are you guaranteed that the file has the correct data so you don't need much error checking? If so, you can use `fscanf()` to read the values. If not, use `fgets()` to read a line and check if the correct …

Member Avatar for nitin1
0
139
Member Avatar for gerbil

OK, this is getting really annoying! I spent 7 minutes trying to add a reply earlier and this CODE Detection would not let me add the post. It detected code. The post in the preview looked exactly the way I wanted it. But the code detection would not let me …

Member Avatar for gerbil
0
242
Member Avatar for dreday92

What is wrong? Please give details. What actually is displayed? (actual text) And what's wrong with this? What do you want displayed? (actual text, variable names, etc) Examples help greatly.

Member Avatar for WaltP
0
288
Member Avatar for ShEeRMiLiTaNt

Instead of for ( int i = 0; i <= NumUsed; i++ ) { for ( int j = 0; j <= NumUsed; j++ ) { cout << List[i][j]; } } try for ( int i = 0; i <= NumUsed; i++ ) { cout << List[i]; }

Member Avatar for VernonDozier
0
344
Member Avatar for Abhineet.Ayan

Store them in a file that the program will read. Use a code that tells you what the file entry is, like Ffilename.ext RregistryKey Vvalue Etc...

Member Avatar for WaltP
0
215
Member Avatar for cool_zephyr
Member Avatar for Secone

It's hard to do two things at once. Try doing the sort first. Then look for the duplicates.

Member Avatar for vijayan121
0
242
Member Avatar for r0vanz01

Not quite. After you input all the numbers, set **min** to **arraySize[0]**. Then you code should work fine.

Member Avatar for r0vanz01
0
189
Member Avatar for pkfx

`Card[nCards]` is one beyond the array definition. Since you allocated **nCards** integers, your last available value is `Card[nCards-1]`.

Member Avatar for Ancient Dragon
0
186
Member Avatar for dreday92
Member Avatar for Ancient Dragon
0
174
Member Avatar for Carpetfizz

I don't understand the term "*some sort of error*". Post the error. Don't take a picture of it and link. > Also, I noticed that it didn't add quotations and curly braces automatically when I created the first one. > The .cpp file was completely empty so I had to …

Member Avatar for Suzie999
0
167
Member Avatar for corby

It's because `node->data = data;` stores the address of your variable **input** into the node during the first pass through the loop. Next time through the loop you enter a new word into **input**. Since all you stored is the address of **input** and not the data itself, the data …

Member Avatar for WaltP
0
120
Member Avatar for Salman93

> hey, i tried a lot, i made it all I see no code to show us what you tried so therefore cannot help you fix it. Unless, of course, you want us to write it for you...

Member Avatar for WaltP
-2
131
Member Avatar for cortiknee

Don't new people bother looking at dates? This thread is only 3 years old... :eek:

Member Avatar for dverex
2
15K
Member Avatar for I_m_rude

> The publicity team for Technozion is in full swing. Like every year, this time too, the team is planning to visit N different colleges in India. This publicity campaign shall involve the members of the team giving presentations... How about presentations on "*The Benefits of Using 25-year-old technology (TurboC) …

Member Avatar for I_m_rude
0
279
Member Avatar for Ahmed Sarwat

> For Example: > char *c; c="END"; c="BEGIN"; No errors **"END"** and **"BEGIN"** are by definition allocated sequential memory during compile time. Then `c="END";` simply loads the address where **"END"** is defined into the pointer **c**. Same with `c="BEGIN";`. It's simply loading a new address into the pointer. > while …

Member Avatar for WaltP
0
173
Member Avatar for Mahkoe

> I've used malloc countless times, but as far as I know, reading and writing to memory that isn't expressly yours (which is in fact done by the malloc function) causes a segfault... So why doesn't malloc generate segfaults? For the same reason when you fly to Pheonix and rent …

Member Avatar for WaltP
0
240
Member Avatar for ChilledGrease

What I would do in this case is print out values the program calculates at key places and see what the variables contain. For example After line 29 output *computerguess* After line 41, 76, 85 output *computerGuess, lowLimit, highLimit* An example, after 76: `cout << "In setLimits (high)" << computerGuess …

Member Avatar for Suzie999
0
290
Member Avatar for murtazamzk

Use CODE Tags!!! Do you have a question or do you just want us to test it for you?

Member Avatar for soumava28
0
2K
Member Avatar for Swati_1
Member Avatar for deceptikon
0
61
Member Avatar for 03Mach1

Another idea for finding the min and max grade: Input midtermgrade set Min and Max to this grade (one of them *could* be true) input projectaverage test with Min & Max and replace if necessary input papergrade test with Min & Max and replace if necessary This way you won't …

Member Avatar for np complete
0
265
Member Avatar for rocky2008

Start by writing a piece of code with two pointers and known contents. Output the value of the pointers and the data that they point to. Now, do both increments on the two pointers. Next, output the value of the pointers and the data that they point to again. Last, …

Member Avatar for deceptikon
0
201
Member Avatar for slasham

> ... and was just wondering if its possible to make a simple program where you type the name of the file and when you press enter it downloads that file from the internet to a certain place on your computer. Of course it is. > where would the files …

Member Avatar for np complete
0
867
Member Avatar for shanki himanshu

512 in binary is 10 0000 0000 The int is probably 2 bytes (guessing by your name you're using Turbo C) So **i** contains (0000 0010)(0000 0000) typecasting **i** to the character **c**, **c[0]** is (0000 0000), **c[1]** is (0000 0010) Replace **c[0]** with (0000 0010) makes **i** (0000 0010)(0000 …

Member Avatar for I_m_rude
0
241
Member Avatar for montjoile

Standard C++ does not allow this. Only a couple compilers have extensions that will, but learning to rely on non-standard functionality hurts you when you need to use different compilers.

Member Avatar for montjoile
0
464
Member Avatar for Prisms

Ahh, we're playing [Jeopardy](http://en.wikipedia.org/wiki/Jeopardy). OK. The question is: *How can I read the file and store student information?* Did I win? ------------------- In answer to your non-question, looks like either idea would work...

Member Avatar for WaltP
0
410

The End.