161 Posted Topics
Re: I have to agree with jephthah, I have programmed AVR and 8051 both in C. Though there is option to program in assembly but when sometimes it becomes difficult to learn the instruction set especially if you want to program many microcontrollers. Furthermore, in the end both the assembly and … | |
Re: Insert line 20 inside the while loop and add the statement [icode]prev=prev->link;[/icode] at the end of the loop. | |
Re: You have created [icode]Node<K> *root; [/icode] before defining the class Node. Declare it after the class. Furthermore I dont think you can use [icode]Node<K> n;[/icode] outside the class. You will have to specify a valid class or datatype instead of template K like [icode]Node<int> n;[/icode] | |
Re: What is there you cannot understand? If you expect someone to hand out the answers then you are wrong. | |
Re: An alternative could be using link list if you want to do it without STL. That way your first issue would be solved, but still the best way would be using vectors. | |
Re: No you cannot. But you can pass the variables by reference so that the changes are reflected in the original variables. For example [CODE=C++] void test(int &a,int &b) { a=a+1; b=b+1; } int main() { int c=23,d=6; test(c,d); cout<<c<<endl<<d; cin.get(); cin.ignore(); return 0; } [/CODE] Here the values of c … | |
Re: I am not sure, the only major update by MS for XP was the SP3. Right click on my computer and check what version of service pack is installed, if it shows Service Pack 3 then that could have caused this. | |
Re: First of all please keep in mind to post your code using the [url="http://www.daniweb.com/forums/announcement8-3.html"]code tags[/url]. You have not done so even after Lerner told you. [CODe] total = total + grades[SIZE]; [/CODE] what you are doing here is adding 0 and value of grade[25] whereas the array size is only … | |
Re: All compilers follow certain processes such as lexical analysis, syntax analysis semantic analysis etc in one way or another. | |
Re: [QUOTE=scru;597231] The idea that somewhat cannot believe in God, His Word, and the Bible amazes me as much as the idea that someone can does most atheists. [/QUOTE] In making this statement you have completely disregarded the fact that other religions other than yours also exist. It is like saying … | |
Re: Its not [CODE] cin >> number,first,second,third,fourth; [/CODE] but [CODE] cin >> number>>first>>second>>third>>fourth; [/CODE] and kindly use code tags in future | |
Re: Please use [url="http://www.daniweb.com/forums/announcement8-3.html"]code tags[/url] to post your code in future. A lot of energy of mods is spent on telling others to do the same it is the least you can do if you expect some help You have created the function won within main() but have not called it … | |
Re: A hint, divide a number by 10. The quotient would be the number except for the least significant digit and the remainder would be the least significant digit. Use these two in combination to get your answer | |
Re: One way to about it would be to enter randomly either a 'X' or an 'O' at every turn of the computer. But this solution would not be very smart. Another method could be exhausting all the possible states of the matrix by using conditional statements and then determining the … | |
Re: Here are a few errors I can see [CODE] int List::sumOfNodes(); [/CODE] remove the ';' at the end. [CODE] while( currentPtr ! = null) [/CODE] null to be written as NULL [CODE] sum = sum + currentPtr; [/CODE] currentPter is of type Listnode not int. You will have to do … | |
Re: I am neither a mod nor a sponsor. I however have an animated avatar ;) And no it is legit. | |
Re: People here are not psychic. Kindly explaing what problem are you having with the code. | |
Re: Line 24, it just default, not case default [CODE] default: cout << endl << "INVALID SELECTION!"; break; [/CODE] And you cannot declare variables starting with numeral. Try this [COde] int attack, attack2, hp2, hp; [/code] | |
Re: I dont mind being called a geek because that is more or less what I am :) Note that the '==' operator does not apply to float. You would get the output as C++ if you tried [CODE] if(f==.7) [/CODE] | |
Re: For a client server model, you will have to code seperately for the server and seperately for the client. The server will basically keep track of all the data like scores, players etc. And the clients would basically be the different players. | |
Re: The program is correct. There is no relation between the names and the love percentage and thus the program only displays random numbers between 0 to 100. You may want to use some relationship between names and random number generation in order to get a similar percentage for a given … | |
Re: Format the partitions from disk management in either FAT32 or NTFS. | |
Re: And then there are some members like me who get up one day and say 'hey i will start posting on daniweb from today' :D | |
Re: [CODE=C++] for(int i=countDown;i>=0;i-- ) [/CODE] | |
Re: mover is a pointer to wheel_node and contents is an int You cannot equate them as you have done in Line 6. In order to create the link list you have to allocate memory using the new operator to each node. You have done that only for the node arrow. … | |
Re: If you are dealing with MS office I think using a software from MS (such as C#.NET, vb.NET or any other .NET varient) will be of more help as compared to other platforms. I think that office activex controls are easily available. | |
Re: Wasn't "Bass guitar god" jbennet's custom tag line till a few days back? | |
Re: It is for you to come up with new ideas, I will comment on a few - a robotic arm that pours beer (a joke!) or any beverage into a glass. Would require fairly complex engineering. There is a good chance that the arm will break the glass. Pretty expensive … | |
Re: Petitions are an easy way of showing that we care. Most of us are either too lazy or too busy to express our concerns in other ways. | |
Re: Do you use a download accelerator? There are a few that split a file into a few parts, this problem could have occured if one part did not download completely. If you do use a download accelerator then try disabling it. | |
Re: Use <= or >= or == operators for checking 180. < operator will check all values less than 180 i.e. upto 179 and > will start from 181. [CODE] while(angle0<180 || angle0>180 || angle==180) [/CODE] btw this is supposed to be in the C section of the forum. | |
Re: Dont know about google but wikipedia seems to be working fine :P [url]http://en.wikipedia.org/wiki/Quick_sort[/url] | |
Re: Are you using a dhcp to assign ip's to your ethernet card? What is your isp? Also if you are using pppoe make sure that your username and password are correct :P | |
Re: Go through this tutorial [url]http://electrosofts.com/serial/index.html[/url] | |
Re: Store the last element in a temporary variable, start from the end and loop till beginning of the array keep equating i th position to the i-1 th position. After the loop equate the 0th position to the temporarty variable. This is how I would rotate an array. Repeat the … | |
Re: ASCII code for 'a' is 97 what you can do is subtract 96 from each character. And typecast char to int. Instead of the switch statement try [CODE=c++] while (input[i]!='\0') { output[i]=input[i]-96; cout<<(int)output[i]<<endl; i++; } [/CODE] to convert within the same array just change output to input. Of course you … | |
Re: [CODE] temp[i] = chars1[i]; [/CODE] I dont think you can do that with allocating memory by using the new keyword. | |
Re: Deciding the problem statement for the project is half the fun of doing the project. Carefully identify your areas of competency and then choose a problem. It will give you more insight about the project and you will enjoy doing it. Usually considerable amount of of research is done before … | |
Re: [QUOTE=avi1109;588996]Hello, i'm stuck with a problem on binary search. I need to compare a string with an array of type string. It is changing the position from which the string should be read but z compare is not successful. here's my code. Any help would be appreciated. thanks in advance. … | |
Re: Creating an OS is never simple. Before you actually begin programming there are lots of theoritical concepts to be learned, for example how will you do memory allocation, how will you avoid deadlocks, resource allocation, processing priority, system failures etc etc. It will take learning of lots of concepts before … | |
Re: You will have to share the printer first from control panel->printers and faxes and then install the printer drivers on all the computers you want to share the printer with. | |
Re: This looks like a fairly difficult task. How do you plan to calculate resistance using capacitance? I would suggest you create a wheatstone bridge setup like [url="http://en.wikipedia.org/wiki/Wheatstone_bridge"]Wheatstone bridge[/url] Here is another link for serial port. [url]http://electrosofts.com/serial/index.html[/url] | |
Re: I am not a networking wiz, but try manually assigning the ip's to each laptop/desktop within the range of those assigned by the dhcp. | |
Re: Another alternative. a=a-b b=b+a a=b-a |
The End.