5,676 Posted Topics

Member Avatar for lotrsimp12345

[QUOTE=lotrsimp12345;1164978]IT doesn't enter second loop don't know why. Any suggestion?[/QUOTE] Yep. Split [ICODE]for(int k=0; k<getphraselength(); k++)[/ICODE] into 2 statements. What call the function every time you go through the loop? Make it: [CODE] len = getphraselength(); for(int k=0; k<len; k++)[/CODE] Now you can display [I]len[/I] and see if the value …

Member Avatar for lotrsimp12345
0
110
Member Avatar for winecoding

[ICODE]str[/ICODE] is a pointer to a character array. Assume [ICODE]char *str = "ABCDEFG";[/ICODE] The first character in the array, 'A', can be represented as [ICODE]*str[/ICODE] -- contents of str [ICODE]*(str+0)[/ICODE] -- contents of 0th element of str Expanding this last one, [ICODE]*(str+3)[/ICODE] -- contents of 3rd element of str: 'D' …

Member Avatar for mrnutty
0
96
Member Avatar for techie929
Member Avatar for limengfang77

Maybe you and [url=http://www.daniweb.com/forums/thread269114.html]MKS200[/url] should get together...

Member Avatar for WaltP
0
150
Member Avatar for mks200

It's obviously code they were given by the instructor, and they both want us to finish it for them.

Member Avatar for WaltP
0
254
Member Avatar for jk_bscomp

As jbennet said a year ago when this thread was resurrected then: [QUOTE=jbennet;916880]Was there a point to awakening an old thread?[/QUOTE]

Member Avatar for WaltP
0
242
Member Avatar for web81

[QUOTE=web81;617933]Hello all can you help me up with this guys.. i have this application with a product id which is in Hexadecimal format..wat i mean is an alphanumeric format.. and it is asking for a product key.. how can i suppose to know the product key? can you give me …

Member Avatar for WaltP
0
826
Member Avatar for VernonDozier
Member Avatar for VernonDozier
1
135
Member Avatar for manatta

Search for the proper software. If you want to do it yourself, check into some universities that have curriculum for computers and vision analysis.

Member Avatar for WaltP
0
74
Member Avatar for khevz09

[QUOTE=khevz09;1164421] can u give me some advice because i really need it ...... Thxxx[/QUOTE] First, figure out what you want to do. Next, write down all the features you need in the program Start designing these features -- one at a time. Use as much detail as possible. Pick the …

Member Avatar for WaltP
0
111
Member Avatar for jaymeaux77

Your first problem is that [QUOTE=jaymeaux77;1158689]Like I said most of it is still half written and Im still fidgitting with it. [/quote] Stop fidgitting with it. Take one task, write it. Test it. Perfect it. Then move to the next task. I'd recommend starting with the display function. Write it …

Member Avatar for jaymeaux77
0
4K
Member Avatar for n.utiu
Member Avatar for n.utiu
0
227
Member Avatar for rollon

He means "[I]Never [B]write[/B] code straight into your editor (from out of your head) without first writing it on paper and desk checking it.[/I]"

Member Avatar for wasimmalik
0
128
Member Avatar for Xufyan

[QUOTE=Xufyan;1162174]Can anyone explain whats wrong with this program [/quote] [ICODE]void main(void)[/ICODE] - [url=http://www.gidnetwork.com/b-66.html]see this[/url] [ICODE]clrscr ();[/ICODE] - very old non-standard function that hasn't existed since 1986 [ICODE]getch ();[/ICODE] - non-standard function that is very non-portable, works in very few compilers and [url=http://www.gidnetwork.com/b-38.html]no formatting[/url] making the program hard to follow.

Member Avatar for Xufyan
0
1K
Member Avatar for dude1

[QUOTE=dude1;1159731]can anyone give me some hints on this im having issues thanks[/QUOTE] Biggest issue is not reading the rules and posting any information at all about what those issues are. We can answer specific questions, but if all you're going to do is talk in generalities, the only help we …

Member Avatar for dude1
0
172
Member Avatar for roc a

What is it defined as? Where/how is it used? Does the use and the definition match? And please [url=http://www.gidnetwork.com/b-38.html][B]format your code[/B][/url]. If it gets any longer and more complex, we won;t be able to follow it. If you want more help, you [I]do[/I] want us to be able to read …

Member Avatar for thomas_naveen
0
242
Member Avatar for Tech E

[QUOTE=Banfa;1163655]With thanks to Firefox for its ability to highlight the word salary[/QUOTE] Not the point. And what if the variable name was [I]salry[/I]?

Member Avatar for WaltP
0
172
Member Avatar for naveedmahar
Member Avatar for rectifryer

[CODE] cout <<"Continue? Enter y or n"<<endl; cin >> c; // put answer in variable c tolower('c'); // convert the character c (not the variable) to // lower case and throw away the conversion // -- didn't put it in a variable if (c == y) // compare the variable …

Member Avatar for Banfa
0
403
Member Avatar for janice777

I don't see an error message posted nor a line number pointed to. You might want to give us ALL the details, not just some of them.

Member Avatar for janice777
0
188
Member Avatar for Phil++

I agree with [B]David[/B] (except there's only one sentence :icon_wink:) The memory aspect actually is more confusing, so don't mention it. It seems immaterial to me in a description unless you are describing the lowest level of programming.

Member Avatar for WaltP
0
83
Member Avatar for Valaraukar

Isn't this basic math? If you know the terms (slope, axis, etc) you already know (or can find) the correct equations. Turn them into code.

Member Avatar for Fbody
0
90
Member Avatar for timbomo

[QUOTE=timbomo;1160025]i want to figure out a way other than a switch statement that will show the user how many gallons of paint are needed when the user says how many square feet they have. [/QUOTE] If you don't want a [ICODE]switch[/ICODE] statement, use a series of [ICODE]if[/ICODE] statements.

Member Avatar for timbomo
0
204
Member Avatar for eternaloptimist

You don't need to make your questions into comments. They are not code. As for making the file, try Notepad.exe

Member Avatar for Lerner
0
140
Member Avatar for eternaloptimist

[QUOTE=eternaloptimist;1163477]i need a function to line up the info with these columns.: Name Test 1 Test 2 Test 3 Average here is the code that i have so far.: #### thanks to anyone who helps me with this.[/QUOTE] I don't see any attempt. There is nothing to help with yet. …

Member Avatar for Fbody
-2
1K
Member Avatar for dondajr

You'll really have to scan the file for the line. There's no telling where any specific lines start.

Member Avatar for dondajr
0
112
Member Avatar for churni

Then look at your [iCODE]for[/iCODE] loops. Are the middle comparisons correct?

Member Avatar for churni
0
223
Member Avatar for sikeufoo
Member Avatar for amol14007
Member Avatar for donazri

Mistake #1: [ICODE]system("pause");[/ICODE] [url=http://www.gidnetwork.com/b-43.html]Here's why[/url] Mistake #2: No formatting. [url=http://www.gidnetwork.com/b-38.html]See this[/url]. If we can't follow your code, it's hard to help. Mistake #3: Not posting the [I]exact[/I] error message.

Member Avatar for LevyDee
0
187
Member Avatar for bigt666

[QUOTE=bigt666;1160992]This is the code: [CODE]//---------------------------------------------------------------------- // // This lab exercise is to practice rand(), srand() and // output formating with help of <iomanip>. It also practices // file input and output. // // Add a text data file to your project called "lab_4_data.txt". Put the following // numbers in it: …

Member Avatar for WaltP
0
227
Member Avatar for LevyDee

Depends on how large it is. It works just fine for small arrays -- say 1000 or less. Larger than 10,000 you might want to try something else if the sort takes too long.

Member Avatar for LevyDee
0
88
Member Avatar for antball06

To be honest, I think Excel would be better than trying to learn C/C++ to do this. It's made for on-the-fly computations. It also makes it very simple to compare possibilities.

Member Avatar for LevyDee
0
185
Member Avatar for aianne

In addition to what [B]Banfa[/B] said, you need to learn [url=http://www.gidnetwork.com/b-38.html]formatting[/url]. Your code is completely unreadable. You should not ask someone else to try and help you with code that cannot be followed. As for lifelines, you need to keep track of all three individually. Use an array.

Member Avatar for WaltP
0
223
Member Avatar for fruymercado

1) Speak English. [I]nid?[/I] Use sentences. Violation of the Rules. 2) Give you code? Why should we do something you're not willing to do? What's in it for us? Violation of the Rules. 3) ASAP? What makes you so blamed important? All these other member's posts are less important than …

Member Avatar for jhaiskie
-1
526
Member Avatar for vbcielle

I'm with [B]bumsfeld[/B] on this one. You want as much precision as you can get throughout the program's calculations and only round for the display. You don't even want to round the number itself, just the display. If you round prematurely, all your calculations will be slightly off. And the …

Member Avatar for WaltP
0
211
Member Avatar for sam_dev

No, peep, we don't. That's why it's [I]encoded[/I]. So you can't decode it. :icon_rolleyes:

Member Avatar for WaltP
-2
95
Member Avatar for endframe

[QUOTE=endframe;1163276]Do you mean doing the IF statement that declares the number being even or odd, I mean this one: [QUOTE]if (x%2==0)[/QUOTE] But then what to do? I understand that we need to make a count but I don't know how. [/QUOTE] You don't know how to do [ICODE]d = d …

Member Avatar for WaltP
0
110
Member Avatar for DrewS

Read the FAQ in the site you linked. All the information is there.

Member Avatar for jephthah
0
131
Member Avatar for mmgoicochea

3 loops all using [I]number[/I]. You should know by now we need details, not vague descriptions. And if you are passing values back from functions, pass them back. Don't use [B]void[/B] functions. That's why they designed [B]int[/B] functions.

Member Avatar for mmgoicochea
0
1K
Member Avatar for ubi_ct83

I don't see any writing to any file. You might want to open/write/close a file and you might get banana into the file.

Member Avatar for ubi_ct83
0
117
Member Avatar for dude1

What is the value of [iCODE]std::string::npos[/iCODE] when the loop starts? Looks like a [iCODE]do-while[/iCODE] would work better here.

Member Avatar for kbshibukumar
0
89
Member Avatar for blind122
Member Avatar for lugan

[QUOTE=lugan;1162550]The array is 200,000 because the string can have up to 200,000 characters inputed in it.[/QUOTE] Why? Read one character at a time. You need 1 character, not 200K.

Member Avatar for lugan
0
100
Member Avatar for tquiva

I don't think I understand the problem. Are you looking for a '\n' right now? Where? Do you want to use a ';' instead? Isn't this fairly obvious?

Member Avatar for jephthah
0
213
Member Avatar for Ritchie Miki
Member Avatar for Salem

Hijack thread? He never mentioned hijack thread. Hijacking has nothing to do with this thread except it deals with new members not bothering to follow rules.

Member Avatar for Biker920
7
175
Member Avatar for xxxSuperTrooper

[ICODE]if (teamScore ==1 && teamScore != -999)[/ICODE] If team = 1 it can't be -999. Simplify both [ICODE]if[/ICODE] statements [CODE] cout << "Team 1" << score1 = sum + numPoints; cout << "Team 2" << score2 = sum + numPoints; [/CODE] Did they both score the points? Once the output …

Member Avatar for WaltP
0
1K
Member Avatar for mjltech
Member Avatar for Gnawk

[QUOTE=photoyid;1162356]BTW, the iostream.h vs iostream is a stylistic thing which was inherited from C. The C style was to use iostream.h, in C++ it isn't necessary.[/QUOTE] It's not a stylistic thing. The .H forms are deprecated and do things differently than the non .H form. The standards have moved forward …

Member Avatar for WaltP
-1
1K

The End.