5,676 Posted Topics

Member Avatar for hurricane123

We've added CODE Tags for the last time for you. You already have 4 infractions and 1 warning for not using them. 1 more infraction and you will be banned. This constitutes your [I][B]last[/B][/I] warning. Follow the rules.

Member Avatar for WaltP
0
124
Member Avatar for no4touchy

First thing I'd do is simplify. These two statements [ICODE]llint diff = labs (start < end ? start - end : (start == end ? 1 : end - start)), *genList = calloc (diff, sizeof (llint));[/ICODE] [ICODE]*(genList + i) = i * byWhat * (diff > 0 ? 1 : …

Member Avatar for no4touchy
0
118
Member Avatar for SIFA

To return a string you have to pass it into the function as a pointer. The [iCODE]return[/iCODE] statement cannot return a string. Your [ICODE]for[/ICODE] statement at the end will never exit. And what are you calculating in [B]iResult[/B]?

Member Avatar for Ancient Dragon
0
134
Member Avatar for girishn
Member Avatar for girishn

[QUOTE=girishn;1178530] Most everything works fine, except when I type Brent [ENTER] #, I get 6 other characters instead of just 5, one for each letter of Brent. I believe it might have something to do with the [ENTER] but I am not sure. Anyone have any ideas?[/QUOTE] That's exactly what …

Member Avatar for WaltP
0
114
Member Avatar for kincaide3
Member Avatar for kincaide3
0
50
Member Avatar for dude1

Close. [CODE] void Clock::setClock() { UL h, m, s; cout << "please enter time in hours, minutes and seconds with a space inbetween eg. 23 59 59\n"; cin >> h >> m >> s; h+=h*3600;//hours to seconds m+=m*60;//minutes to minutes s+=s+h+m;//seconds for hours, minutes and minutes secs = s % …

Member Avatar for dude1
0
121
Member Avatar for whatThewhat
Member Avatar for monjed

I'm confused too. There is no formatting making the code difficult to read. There is no description of what you are having problems with. There is no information about what is confusing. Therefore, I have little to offer.

Member Avatar for monjed
0
116
Member Avatar for HeavySoul

[iCODE]fgets()[/iCODE] will read up to BUFFER-1 characters [B]or[/B] up to and including the '\n' in a line, whichever is smaller. So if your file contains [iCODE]ABCDEFG[/iCODE] and BUFFER is 6 you will have in your input [iCODE]ABCDE\0[/iCODE] or [iCODE]ABCDEFG[/iCODE] and BUFFER is 10 you will have in your input [iCODE]ABCDEFG\n\0[/iCODE] …

Member Avatar for girishn
1
134
Member Avatar for Asheem
Member Avatar for Asheem

[QUOTE=Asheem;1178099]The program needs to read a file, in which position are mentioned in form of 0 and 1, and location (i,j), of the robot, who has to go the end point has to, generate numbers, randomly, BUT ALSO STORE THOSE LOCATIONS SO THAT THE ROBOT DON'T GOES TO THE SAME …

Member Avatar for WaltP
0
182
Member Avatar for pearle

threeDays[0][0] = 'M' threeDays[0][1] = 'o' threeDays[0][2] = 'n' threeDays[1][0] = 'T' threeDays[2][0] = 'W'

Member Avatar for pearle
0
1K
Member Avatar for Jaxzen

[code] for (int n=0; n<=t.length()-1; n++) t[n]='*' [/code] Test for SPACE before executing the statement so you can skip over it.

Member Avatar for WaltP
0
144
Member Avatar for ahmed hefnawy

[QUOTE=ahmed hefnawy;1177918]...understood[/QUOTE] I think so. you want us to write it for you, and you can't be bothered to read the Member Rules. Both are mistakes on your part.

Member Avatar for WaltP
0
76
Member Avatar for Jaxzen

Are you absolutely sure the file opens correctly? You need to test the return value of the file open to make sure it's really open. Can you guarantee that there are exactly 8 values in the file? What if there are only 7? Or 10? You should probably loop, reading …

Member Avatar for Lerner
0
930
Member Avatar for atticusr5

[QUOTE=atticusr5;1173250]Hey everyone here are my updated errors, and code, i have gotten them down too three now Errors: 1>assign10.cpp(273) : error C2065: 'Start' : undeclared identifier 1>assign10.cpp(274) : error C2065: 'Start' : undeclared identifier 1>assign10.cpp(275) : error C2065: 'Start' : undeclared identifier [/QUOTE] break the error down into pieces: [B]Start[/B] …

Member Avatar for atticusr5
0
171
Member Avatar for mmgoicochea

Rewrite your calculation section so it's doesn't use tricks. Make it straight forward and simply output each calculation.

Member Avatar for mmgoicochea
0
197
Member Avatar for athlon32
Member Avatar for bill_

[QUOTE=bill_;1172656]i changed the array and the output is still the same. (random symbols). Also i thought that array[3] had 4 memory slots. so that is why i had the array number set to 1 less then wat i needed[/QUOTE] Why would [B]array[3][/B] have [B]4[/B] slots? It only has 3, as …

Member Avatar for bill_
0
459
Member Avatar for petteyg

No it's not portable at all. That's why it's not recommended. C/C++ does not have a standard way to accept input without a Return.

Member Avatar for petteyg
0
255
Member Avatar for greatunknown

What do you think setw() does given how you used it? What is displayed and what did you expect it to display?

Member Avatar for greatunknown
0
279
Member Avatar for lionaneesh

Do not use [iCODE]fflush(stdin)[/iCODE]. [url=http://www.gidnetwork.com/b-57.html]Here's why[/url]. Reading the meaning, you are only reading 8 characters. Isn't the meaning longer? And you did not explain well enough what the problem is. What is the result of the code?

Member Avatar for nezachem
0
158
Member Avatar for kut KK
Member Avatar for MyrtleTurtle

After you read the last number, you still have the end-of-line in the file. here's where [ICODE]getline()[/ICODE] can clean up the EOL. Since you didn't describe in detail what's really happening with the second line, that's my guess. But using [ICODE]getline()[/ICODE] to read each line and parsing the line is …

Member Avatar for MyrtleTurtle
0
125
Member Avatar for mucoool

Then 1) the batch file is not in the directory specified 2) the system call is not being executed 3) the batch file is being executed and give no feedback 4) the program is not working fine Maybe more details are necessary.

Member Avatar for thomas_naveen
0
206
Member Avatar for jasneg16

[url=http://bdn.borland.com/article/21751]Turbo 1.01[/url] [url=http://bdn.borland.com/article/20841]Turbo 2.01[/url]

Member Avatar for WaltP
0
147
Member Avatar for KBL

[B]sl[/B] is a string class, and [iCODE]strcmp()[/iCODE] works only on char*. Use the string class for [B]owner[/B] and [B]pass[/B] and you can simply use == to do the compare.

Member Avatar for KBL
0
25K
Member Avatar for Violet_82

[code] cout << "So, type the missing number here: "; cin >>f; if (f==5) cout << "Well done!\a\a\a"; while (f!=5) { cout << "Wrong answer, try again!\nEnter the number here: "; cin >> f; } return 0; }[/CODE] Look more closely at this piece of code. If you enter 5, …

Member Avatar for Violet_82
0
141
Member Avatar for gorgey506

[QUOTE=gorgey506;1174269] What did i do wrong[/QUOTE] Didn't use CODE tags Didn't tell us what problem you are having. HTH

Member Avatar for gorgey506
0
179
Member Avatar for lamakun

You need to completely understand the [B].doc[/B] format in order to split a document properly. Do you understand the headers and all?

Member Avatar for vb5prgrmr
0
177
Member Avatar for khan001
Member Avatar for tinkeydo

[QUOTE=tinkeydo;1174284] I would like for the program to be able to "delete" any character and all of its information from the text file. I believe this involves reading and copying the text file until it reaches the characters name than skipping that line and the next four informational lines before …

Member Avatar for tinkeydo
0
302
Member Avatar for timbomo
Member Avatar for Nick Evan
0
162
Member Avatar for timbomo

[QUOTE=timbomo;1174447]i got errors and i cant find out what they meant i have went down the program line by line trying to figure them out and i am having no success. I am trying to use call by call values and parametrers n this program. (list of errors are below)[/quote] …

Member Avatar for mattjbond
0
353
Member Avatar for timbomo

you need to look up the parameters for [I]rand()[/I]. You obviously missed something.

Member Avatar for WaltP
0
89
Member Avatar for Xlphos

[QUOTE=Nick Evan;1171352][QUOTE=Xlphos;1171314]I have found my self replying to threads that are weeks old. I could edit the post but would removing all the text remove my post?[/QUOTE] If you made a descent reply, then why want to delete it?[/QUOTE] And if you didn't make a decent reply, why not? :icon_mrgreen: …

Member Avatar for Nick Evan
0
213
Member Avatar for TheZea

Take it a step at a time. Initially, forget the class itself. How would you represent a [B]Bigint [/B]value? As a long? As an array? What makes the most sense for 20 digits? Conceptually, how would you do an operation on this value? Now write an input and output function …

Member Avatar for TheZea
1
459
Member Avatar for rockstar8577

[QUOTE=rockstar8577;1173346]I think im gonna do Win32 api, i just need to find c++ tutorials, not ones in c[/QUOTE] Win32 api should work the same in C as C++. All you need to do is call the functions properly from your C++ code. The C tutorials should help you just fine.

Member Avatar for rockstar8577
0
193
Member Avatar for gorgey506

No, a [I]statement[/I] is bolded and underlined. The error is missing -- you have to post it.

Member Avatar for gorgey506
0
163
Member Avatar for Unidennn

Your understanding is faulty. You cannot pass a string into the [B]is[I]xxx[/I]()[/B] functions. You pass in a character and the return is non-zero for TRUE and 0 for FALSE.

Member Avatar for Unidennn
0
130
Member Avatar for kmaxat

All programs start with a clearly defined concept and clearly defined design. Do you have a clearly defined process for keeping someone on task?

Member Avatar for kmaxat
0
100
Member Avatar for jcb0806

First thing is [B]var[/B] is a reserved word. Don't use it as a variable. Second, you went to the trouble making [iCODE]IsEvenNumber()[/iCODE] but you don't call it.

Member Avatar for WaltP
1
2K
Member Avatar for COKEDUDE

[QUOTE=COKEDUDE;1173384]Can someone please explain why this function will not compile. [/QUOTE] It would be better if [I]you[/I] explain why you think it doesn't compile. I assume the compiler says something to lead you to that conclusion. By posting what it says, we can tell you [I]exactly[/I] why, and we won't …

Member Avatar for Narue
0
168
Member Avatar for somaja

At the very beginning of the program, open a file names [B]XXX.XXX[/B] for writing. Write something (anything) into it. Close the file. Now search for the file [B]XXX.XXX[/B] on disk. When you find it, that is where your input file must be. Move it there. Delete that new code and …

Member Avatar for somaja
0
212
Member Avatar for Afupi

What I would do is whether you find a solution or not, just keep looking. IOW, when you find the first solution, save it in a file. Then just continue looking as if you didn't find a solution. Eventually, you should find them all.

Member Avatar for Afupi
0
571
Member Avatar for nupurashi
Member Avatar for WaltP
0
101
Member Avatar for smeghead007

[QUOTE=smeghead007;1171682]Ok what I need to do is utilize a binary search algorithm and determine the index location of a set of keys. The keys are in the file the user enters along with the numbers that have to be searched through. But im lost on how to do this. Do …

Member Avatar for WaltP
0
104
Member Avatar for akaban
Member Avatar for akaban
0
247
Member Avatar for vkspune

And you want us to do it for you? That's not what we do here. You write it, and we help you fix it.

Member Avatar for WaltP
0
42

The End.