338 Posted Topics

Member Avatar for blair.mayston

Were you using the formula from page 8 of the pdf? Shouldn't it be more like this? [code=python] return (0.0 + c - min(a, b)) / max(a, b) [/code] I could be wrong, it wouldn't be the first time (grin).

Member Avatar for Gribouillis
0
108
Member Avatar for tillaart36

First, the directory structure shown by walk doesn't quite appear to match what you said the structure would be. For example, the directories under Library appear to be prefixed with a number (as in 1_Vrijstaand). For another example, the files under the individual directories don't show the 1_simple.max, 1_detailed.max, 1.csv …

Member Avatar for Murtan
0
89
Member Avatar for abby2589

So the first file defines the 'encryption' The second file contains the 'message' to be encrypted. The third file you are supposed to generate as the encrypted message? If so, you will need to open and parse the first file, using the data you find to develop the translation. I …

Member Avatar for Murtan
0
112
Member Avatar for jesse_johnson2

Actually, it should never get to that print line...it returns from inside all over the function. (Though I'm not sure that the returns in all of the test are required.) Is the board required to be in an [ICODE]int tttb[3][3][/ICODE] or could we store it in an [ICODE]int tttb[9][/ICODE] and …

Member Avatar for jesse_johnson2
0
93
Member Avatar for disc

const is a 'promise' not to change. If you have member-functions that do not change your class (and never should) you can declare them const. const member-functions are declared like this: [code=c++] int getValue() const; [/code] The primary purpose for const member-functions is that they are the only member-functions you …

Member Avatar for disc
0
183
Member Avatar for acejones109

Ok, just to make sure I understand, you're running on computer A and can telnet to computer B. You want computer B to telnet to computer C? Why not telnet from computer A to computer C directly? If the above A -> B -> C scenario is what you're trying …

Member Avatar for leegeorg07
0
114
Member Avatar for WhizKidd

Optionally, unless the requirements specifically require that you use a 6 by 6 matrix internally, the program could continue to store the grid in a single list. The internal program structure of your data does not [U]need[/U] to be the same as the external representation. Use the internal structure that …

Member Avatar for WhizKidd
0
1K
Member Avatar for scru

Ok, so you appear to have some code there already. I don't see any notes there about what you want to do that needs more developers. Where are you wanting to take the project that you would like to have help with? (If I offered to help, what would you …

Member Avatar for leegeorg07
0
156
Member Avatar for MK12

No the problem is with python...you can't run python code without having python installed (or using the large python dll that has all of the python stuff in it.) The python code expects that all to be there. If you want to reduce the size of what you're shipping, you …

Member Avatar for MK12
0
172
Member Avatar for Stefano Mtangoo

Your goals are still VERY vague, but the bottom line is that for most peer-to-peer chat programs, you will open a socket between the two computers. Whether they hold the socket open (likely) or open and close it is an implementation detail. To get the socket initially established, one of …

Member Avatar for lllllIllIlllI
0
174
Member Avatar for DemonGal711

Where is the declaration of com_num in relation to the order function? com_num needs to be visible to any compile target that can see order. What specifically is the compiler error? Which is the line that generates the compiler error?

Member Avatar for DemonGal711
0
76
Member Avatar for AntonioMontana

The 'link to problems' you give is to the w3.org validator for the site. The first error listed is [icode]Line 24, Column 21: document type does not allow element "div" here; assuming missing "li" start-tag.[/icode] The relevant section of your html is here: [code=html] <ul> <li></li> <div id="texto1">****** | home …

Member Avatar for Murtan
0
98
Member Avatar for phillipdaw

Please when posting to these forums, wrap your code in code tags (like daviddoria did above). Use either: [noparse][code]...[/code][/noparse] or [noparse][code=c++]...[/code][/noparse] The second form provides for syntax highlighting and line numbers.

Member Avatar for siddhant3s
0
105
Member Avatar for MJV

Side comment - with 18 post under your belt, you should have known enough to wrap your code in code tags. [noparse][code] ... your code here ... [/code][/noparse] at least, but for this forum, preferably [noparse][code=c#] ... [/code][/noparse]

Member Avatar for sknake
0
290
Member Avatar for atman

I agree that I generally don't use the this pointer. About the only time I use it is when I call a method or function outside of the class that needs to refer back to my object. An example might be registering my object with a 'server object' for callbacks.

Member Avatar for siddhant3s
0
143
Member Avatar for tones1986

In the ZIP file, student.h still contains: [icode]SinglyLinkedList<CourseInfo> courseList;[/icode] so the student does NOT contain a linkedStack. If you want it to contain a linkedStack, you have to tell the compiler by changing the line.

Member Avatar for Murtan
0
160
Member Avatar for hurbano

do the overloaded operators need to be implemented as members of the class, or could they be implemented 'outside' the class? (I think in class may be required or recommended) Do you need to have the operators return a value?

Member Avatar for VernonDozier
0
441
Member Avatar for janakavishwajit

If the code you want to call belongs to an object on the same page as the javascript, I think you can make it work. If the javascript is running in an embedded browser and you want it to call code in the surrounding application, I don't think you can …

Member Avatar for janakavishwajit
-1
91
Member Avatar for Udxero

I thought AncientDragon explained it pretty well. Your assignment is to create a couple of functions which implement the menu options 'A' and 'B'. When you're done, the person running the program shouldn't be able to tell that you have made any changes, the program should still behave as it …

Member Avatar for shasha821110
0
252
Member Avatar for chebude

It might help if you could write (in your own words) what it is that you think you need the program to do. The first example looks something like: There are 10 (or N?) input files with line-oriented records. Each input line contains 4 fields. Generate an output file that …

Member Avatar for chebude
0
173
Member Avatar for starzstar

@starzstar I think the module you're looking for it getopt It is designed to parse command line arguments and handles the type you indicated. @keerthihm You should probably have started your own thread and not replied to this one. You seem to be asking about testing a binary tree. Which …

Member Avatar for Murtan
0
155
Member Avatar for Jigs_ff

As this appears to be your third post on the same topic (different forums) in less than a week, I have to ask, did you read the FAQ's? We will generally not provide a canned solution for you, we will help you to develop your own solution to the problem, …

Member Avatar for jlm699
0
128
Member Avatar for Himerz

Thanks for using [noparse][code][/code][/noparse] tags, but your formatting could still use some work :) If you use [noparse][code=c++][/code][/noparse] tags, the code will have line numbers and syntax highlighting. The first section trying to validate input: [code=c++] cout << "Please enter in your desired amount of lines for your"<< endl; cin …

Member Avatar for Himerz
0
302
Member Avatar for whiteflags

Just a comment: [code=python] return len(possibles) / len(winners) * 100.0 [/code] Calculated the wrong percentage I changed it to: [code=python] return 100.0 * len(winners) / len(possibles) [/code]

Member Avatar for Murtan
0
79
Member Avatar for yasserovic
Member Avatar for rosenberg_a

The code [code] cout << "It will take " << W.getDays() << " days and " << W.getHours(); << " hours of time." << endl; [/code] should only have one ';' after the endl. The one after W.getHours() does not belong.

Member Avatar for rosenberg_a
1
141
Member Avatar for rottmanj

TestClass has no means to find the DbConfig declared inside main. If TestClass needs to access it, that DbConfig must either be given to TestClass as a parameter of some sort or if having one and only one DbConfig would be proper, you could provide support for and access to …

Member Avatar for StuXYZ
0
100
Member Avatar for anu123d

problems in fnAddDepartment(): [code=c] fgets(ArrTemp, ARR_TEMP_SIZE, stdin); for(iLength=0; iLength<ARR_TEMP_SIZE; iLength++) { ArrTemp[iLength]=Dept_Name[iLength]; } [/code] The first line gets input into ArrTemp, the remaining 3 lines overwrite the input with the previous name (which at the time it is used is undefined.) You should be using looping constructs inside fnAddDepartment() and …

Member Avatar for Murtan
0
222
Member Avatar for Ali22615

The limit for the 'i' loop in bubbleSort() is interesting, but it appears that it would work. You will probably need to allocate the array and fill it with the data you read from the file. Then you will need to call bubbleSort() and pass it the array and the …

Member Avatar for Murtan
0
91
Member Avatar for lehe

Whether or not the source is available for a given library is up to the developer of the library. If the source files are not included, you can't step into them. (Unless you like to read disassembly.) If the library is only released as a dll, the same applies. If …

Member Avatar for Murtan
0
132
Member Avatar for NarendraRoy

Looks like a nice homework problem, maybe if you put some work into it first, you might actually get an answer. See [URL="http://www.daniweb.com/forums/announcement114-2.html"]Homework Help[/URL] When you start posting code so we can help, use [URL="http://www.daniweb.com/forums/announcement114-3.html"]code tags[/URL] If you have absolutely no idea where to start, show us your design (how …

Member Avatar for Murtan
0
144
Member Avatar for maddy05

I agree with all of Lerner's comments. I decided your problem looked like fun so I decided to try and get it to compile on my system. What Compiler are you using? What is your target Operating System? (My compiler didn't have support for the BGI graphics so I had …

Member Avatar for Murtan
0
246
Member Avatar for Nyaato

I've always thought that the 'snake' collision detection just looked at the next square the snakes head was going to be put. If there's something in the square, its a collision. If its food, the snake eats it and that's a good thing. If it's wall or part of either …

Member Avatar for Murtan
0
154
Member Avatar for mohan_198505

I don't think you can use scanf and meet those criteria, scanf will not accept spaces. I suggest using fgets and parsing the line you get back to validate.

Member Avatar for Aia
0
116
Member Avatar for gamerprog

Did you mean to loop until both were dead, or until one was dead? [code=c++] while (hp >=1 or enhp >=1) [/code] Reads (in english) "While the player health is at least one or the enemy health is at least one, keep fighting" I think you wanted to stop if …

Member Avatar for Murtan
0
2K
Member Avatar for Teethous

Your class has space for 4 class names and 4 grades. But when you accept input from the user, you read a class name and then 4 grades for that class. Then you read the next class name and 4 grades for the second class. (But you store the 4 …

Member Avatar for Teethous
0
346
Member Avatar for lonely_girl

Rephrasing one of your if statements into english: [code=c] if (d>=21 && d<=19 && m==3 && m==4) [/code] That reads: If the day of the month is both more than or equal to 21 and also less than or equal to 19 {this is impossibility one} and the month number …

Member Avatar for lonely_girl
0
145
Member Avatar for asharrajpoot

From my first glance at your problem, it would appear that the first line is a 'special case' as it does not have spaces at all (which would work as the zero spaces case) but the 'left side' and the 'right side' are not mirror images of each other. Someone …

Member Avatar for me_ansh
0
189
Member Avatar for boomtoom

I wasn't in your original chain...but I'll try to help. (I ended up compiling and running your code in the debugger) Your problem is that you have a pointer to a pointer and you're indexing off the wrong pointer. I changed your code: [icode]fscanf(f1,"%d ",&pcall[i]->day);[/icode] to this code: [icode]fscanf(f1,"%d ",&(*pcall)[i].day);[/icode] …

Member Avatar for me_ansh
0
123
Member Avatar for ademsaykin

As we stated in your previous thread, we will help you if you put in some effort, but we don't solve your problems for you. When posting c++ code, please use c++ code tags [noparse][code=c++] // Your code here [/code][/noparse] Just pick one function at a time and write them. …

Member Avatar for Murtan
0
189
Member Avatar for anuroop0707

We don't do 'code to order' feel free to post your code and we'll help you work through your problems. Or ask a much more specific question like 'How do I open a file'? if you can't find it on google (or equivalent)

Member Avatar for Lerner
0
254
Member Avatar for Mighty

Once you have both of those, you can use the two numbers to calculate the total weight of the widgets. And if you know how much all the widgets weigh and how much a single widget weighs (and at this point you would know both of those) you can calculate …

Member Avatar for Mighty
0
352
Member Avatar for rhoit

We're having a communication problem. We are recommending that you create in memory a copy of what you want the file to contain. You are being specifically advised against trying to 'edit' the file as the user types keys. The memory 'buffer' is what the user will edit. They can …

Member Avatar for Murtan
0
137
Member Avatar for revenge2

Q2 is a slice construct I had not seen before. Apparently the full slice spec is [start : end : step] so [::-1] says I want the whole string stepping backwards. You can slice any list or string...play with it, it is a fun syntax. It can also be used …

Member Avatar for Ene Uran
0
125
Member Avatar for tones1986

Same result here. You need [icode]#include "person.h"[/icode] in student.h because Student derives from Person.

Member Avatar for vmanes
0
271
Member Avatar for sotiris25s

(*rats I wasn't first reply :( *) [ICODE]int i,j surname[N],name[N],ID[N],grade[M][N];[/ICODE] Declares all of those variables as integer. Should some of them have character data? The format in [ICODE]scanf("%s",name,surname,id)[/ICODE] will only read one string value. surname and id will be empty. (But as noted above, name, surname and id are all …

Member Avatar for ajay.krish123
0
196
Member Avatar for Lilal

Comment on your first code segment: I would have been tempted to use fgets() but your code should work. Second and Third code segment: The following will always subtract 65 (which is the ASCII code for 'A'). Is there any time you wouldn't want to do it? (For example, if …

Member Avatar for Lilal
0
119
Member Avatar for MyRedz

When posting c++ code, please use c++ code tags [noparse][code=c++] // Your code here [/code][/noparse] In the line: [code=c++] len=(int)log10(num)/log10(base)+1; [/code] the (int) is binding to the log10 call rewrite the line as follows to get the logs divided before taking the int: [code=c++] len = (int)(log10((double)num)/log10((double)base))+1; [/code] The casts …

Member Avatar for MyRedz
0
124
Member Avatar for rock9449

You REALLY need to move this to an array... From the text printed next to answer3 and answer4, what you really need is something more like this: [code=c++] if (num1 > 0) { answer3 += num1; } else { answer4 += num1; } [/code] and repeat it for the other …

Member Avatar for StuXYZ
0
110
Member Avatar for serkan sendur

There's no real difference in how the symbol is treated other than the fact that the compiler would allow you to modify argv in the second example. (Not that modifying argv is a good idea.) The first example should complain if you tried to do [icode]argv++[/icode] but the second example …

Member Avatar for shasha821110
0
107

The End.