406 Posted Topics
Re: He hasn't just failed in coding the function AncientDragon he literally hasn't coded get get_record() ... ;) And very bad coding style with the functions process_choice() and add_record() you are calling the functions but inserting the record literally whats the use man ??? Take the inputs from user and feed... … | |
Re: Well I googled Dark GDK Tutorials in Google And I got just 10,600 links man,you too could have done the same well [URL="http://www.pdf-search-engine.com/dark-basic-pro-tutorial-pdf.html"][B]here is one[/B][/URL] I think would help you | |
Re: [code=c++] main() { int x,n, count=0; n=n+1 nxt: cout<<"x=.."; cin>>x; if(x>60) count=count+1; if(n==10) cout<<count; else goto nxt; }[/code] You really sure that this is a code ??? Because I don't see any thing that this program can do... All I see is C++ being used. Not only you but [B]any … | |
Re: [QUOTE][COLOR="Red"]You are not doing anything wrong[/COLOR], you just did not do anything accept for get it ready to be coded...[/QUOTE] [B]@u8sand :[/B] I really think you need to look at the code first and then give your comments.I found all the mistakes listed below.And you didn't find even one ??? … | |
Re: You can use this in your function : * Test if string[i] is a character and then decimal value of that character (assumed to be a hex value A-F or a-f) can be done by : [icode]dec_value = 10+(int)((int)string[i]-65)[/icode] (for upper case) or [icode]dec_value = 10+(int)((int)string[i]-97)[/icode] (for lower case) . … | |
Re: Well [URL="http://www.microsoft.com/express/vc/"]VC++[/URL],[URL="http://www.bloodshed.net/devcpp.html"]DevC++[/URL] and [URL="http://www.codeblocks.org/home"]CODE::BLOCKS[/URL] are great.And in case you don't like them you can always go back to good'ol Linux for g++. | |
Re: Your usage is incorrect.You can use it as : [code=c] struct File1 { //Your structure definition }; struct FILE { //Your other members struct File1 f1;//Here File1 acts as a abstract data type }; [/code] You can also use the same thing above as this : [code=c] struct File1 { … | |
Re: Try the links in above post and ya try [URL="http://www.w3schools.com/"]w3schools.com[/URL] You have got lots of tutorials about everything related to web and you also can try out commands there only.It may be of some help :) | |
Re: [QUOTE=ermithun;906394]oh!! that wa a typo.. yeah u assumed it rite , that was 'ptr' instead of B in the return statement. yeah, i m not deleting it. so, i m going against the OOPs concept here.. when i am creating an object using 'new' operator and it shud be deleted … | |
Re: We got what your question is but sorry to say you wont get any help here until you work on it first. Try coding it stage by stage.Let it be primitive itself don't worry.Code it and then come back to us for help.We will be very happy to help. | |
Re: Ever heard of [URL="http://www.google.co.in/"][B]GOOGLE[/B][/URL] ??? You get loads there...!!! | |
Re: [B]Errors : [/B] [B]1>[/B] You cannot code like this.[B]isdigit() is a function[/B]: [code=c]if isdigit(cResponse);[/code] It should be [code=c]if(isdigit(cResponse));[/code] [B]2>[/B]Be sure of the portability of [icode]scanf_s[/icode] [B]3>[/B]Your program has a lot of mistakes. * [code=c] { printf("\n\tThis program will determine if you are old enough to vote:\n"); printf("\n\tPlease enter your age; … | |
Re: I hope your implementation of list is something like : [icode]typedef struct node * LIST;[/icode] In the save_file function: [QUOTE]for(p = L; p != NULL; p=p->next) fwrite([COLOR="Red"]&p[/COLOR], sizeof(celltype), 1, fp);[/QUOTE] You need to specify the address of the character array which holds the value.Say your structure is as [code=c]struct node{ … | |
Re: I sense a problem here in your load file function : [code=c] for(ctr = 0; fp == 0; ctr++) fread(&(r[ctr]), sizeof(studrec), 1, fp); [/code] You can correct it as [code=c] size_t c; for(ctr = 0; c != 0; ctr++) c=fread(&(r[ctr]), sizeof(studrec), 1, fp); [/code] Above code will take one extra … | |
Re: [B][COLOR="Red"]Error:[/COLOR][/B] Put it in [B]CODE TAGS[/B]. !!! You have lots of errors in this code man... [B]1>[/B] In getData functions you are returning values [icode]return 0;[/icode] at several places but its a no return [icode]void[/icode] type of function. So either change the return statements or change the type of return … | |
Re: Ya lots of ideas : [B]1>[/B] You could make use of code tags which would have made this post better.Read [URL="http://www.daniweb.com/forums/thread93280.html"]this[/URL].Or just click # on right top corner. [B]2>[/B] You could stop using extinct files like <conio.h> And ya mainly : [B]3>[/B]If you are using TC and doing something like … | |
Re: Not [B]probably a crash[/B] but [B]it will definitely crash [/B]the second time.Because the first delete will deallocate the memory reference with respect to pArray then second time when we try to deallocate the memory references we try for pArray[0] to pArray[9] but parray[0] is already de allocated by first statement. … | |
Re: Know one thing : To assure that its a palindrome you need to check the whole string and get positive results.But to say its not a palindrome you just need one dissimilarity in your check. So you can just do this... [code=c] d=strlen(str)-1; for(i=0;i<=d;i++) { if(str2[d-i]!=str[i]) { flag=1; break; } … | |
Re: One of the problems I see is this [code=c]return *output;[/code] It is actually returning output[0] here when you want it to return the address of output array. It should just be [code=c]return output;[/code] Sorry fellows Daniweb is loading too slow on my side so when I was posting I couldn't … | |
Re: Why do you guys don't put in a bit of extra seconds to type what you need in [URL="http://www.google.co.in/"]google[/URL] ??? [B]#1[/B] [URL="http://www.asciitable.com/"]Your ascii table (it took me all of 2 seconds to get it)[/URL] [B]#2[/B] Wild goose has defined it in a very good way. [B]#3[/B] You don't even need … | |
Re: You are at the right place and you have hell lot of information available on web about CPP . Here are your [URL="http://www.daniweb.com/forums/thread70096.html"]books[/URL],[URL="http://www.daniweb.com/forums/thread19956.html"]time saving tips[/URL] and [URL="http://www.daniweb.com/forums/thread67837.html"]practice problems[/URL]. You had all these at the page start itself ;). | |
Re: [B]@siddhant3s[/B] : Well what you have written is for predefined things,that is if a programmer knows that he is going to initialize variables by name x y z then he can maintain an array to know the values stored in those variable names. And its static. The compiler does it … | |
Re: Well you can always write your own function and add it to the headers and include it in all your usages. Its quite common . If its [B]too good[/B] then it may be included in the standard headers in future ;). | |
Re: Ya we are too good for such small programs...Now do it yourself smart fellow...!!! | |
Re: C.S.U.R.F.E.R.: Cybernetic Synthetic Unit Responsible for Fighting and Efficient Repair ;) | |
Re: Here you wont get any help until you show some effort... Most of us here are students,and we too learn the same way...so stop chikening out and try!!! You will do it. | |
Re: Have a look at [URL="http://msdn.microsoft.com/en-us/library/azk8zbxd.aspx"]C SEQUENCE POINTS[/URL] in google.You'll get to know a lot. | |
Re: Wow such a nice problem to solve !!! I solved it now you too try !!! :) | |
Re: You are not lost after coding this much you are lost from the beginning... [B]Hell lot of mistakes :[/B] [B]1>[/B] [icode][#include <iostream>[/icode] Typing mistake [B]2>[/B][icode] int int main(void)[/icode] What is this form ??? [B]3>[/B] [icode]cout <<a1[45]<<endl;[/icode] Segmentation fault illegal memory referenced alloted memory is from [icode]a1[0] to a1[44][/icode] for declaration … | |
Re: [QUOTE]restrictions need to be placed on the computer so it is not invincible...[/QUOTE] Concentrate on this part because it is very easy to make computer win everytime or to make it loose everytime,but randomizing the win or loss is difficult. | |
Re: [B]@adatapost : [/B]There is a huge difference between just 0 and NULL . You may not get an error but that doesn't mean you are right. ASCII 0 is [B]null character value[/B] even using '\0' is better when using null character rather than just a 0 and even in that … | |
Re: You cannot swap two nodes of linked list just by holding two pointers you need at least three for totally swapping two nodes so instead why not switch the contents instead of nodes ??? [code=c] void sortbyID() { struct school *pre; struct school *move; struct school *temp; /*And allocate memory … | |
Re: Well two different linked list just means you are holding two different head pointers to those lists what else? You can use the same structure for constructing their nodes unless you want the information to be held in s1 and s2 are different.Post in your code if you still have … | |
Re: [B]>I have another problem I'm using two linked lists and I opened two files for each one but when I write list to file It writes both lists in the two files . [/B] You are using c and m as two pointers to mark the two lists right? Thats … | |
Re: [B][COLOR="Red"]@athlon32[/COLOR][/B] [B][U]Check your answers before posting.[/U][/B] [B]1>[/B][QUOTE]They are not, i ran it on my computer and i get 2 different addresses[/QUOTE]The address should be same because the OP is returning the object b address and assigning it to a. [B]2>[/B][QUOTE]I don't think so, I removed the function fun() and left … | |
Re: Well how have you written the records in the file from which you are taking the input ? Extras : >Try not using .eof() function its not good to use it like this several times discussed already in this forum. >And within the read looping you can always include a … | |
Re: Well where are you exactly using template functionalities in this code segment ??? I don't see its usage anywhere in the code given by you. | |
Re: Every thing but this makes sense to me : [code=c++] return weekdayT((day-1)%7); [/code] Assuming that the other user function which you have written is going to send values from 0 to 6 only for a weekday(if you have written that properly;)) then (day-1)%7 makes absolutely no sense and is redundant … | |
Re: Hey [B]MosaicFuneral[/B] you seem to love spam msgs....thats funny dude !!! :) | |
Re: Every language is beautiful in its own way...C++ is modern object oriented language which is the trend now (and ya better one too out of C and C++ ).But C kind of pushes you into a place where you need to struggle a bit but will strengthen your coding skills … | |
Hey I have been using [B]Daniweb[/B] for quite some time now and I really feel that it should include a section on [B]Latest Attacks[/B] say virus attacks,hackers tweak and other things which can harm the computer and putting light on how to overcome those attacks in the best possible way. … | |
Re: Well a weird idea but you can even split the number into digits and store in a linked list or an array or something else... flex your brain and you will do great !!! | |
Re: Well this is what I got to say, [B][B]@cbaechle:[/B][/B] Your thought flow is in the right direction. Looking at the code and assuming you are still at the initial stages(that you haven't yet come across complex stuff) ya n=n->link becomes more or less equal to n++ when n is allocated … | |
Re: Many Many Happy Returns Of The Day !!! And Welcome.... >[B]Should I learn how to do C++ in windows and then learn.. Linux shell scripting (did I say that right)? [/B] Well if you ask me thats the easy way but I would suggest you to learn and practice according … | |
Re: Hey [B]William Hemsworth[/B] what you are saying is absolutely right,but being one of the reputed posters on Daniweb and knowing the intentions of this forum and its posters,a little support here would be great on this matter,because [B]even though giving away codes is not [COLOR="Red"]"banned"[/COLOR],its unethical to do so,[/B]even you … | |
Re: Well I'd like to tell two things : 1> I really didn't get how is your algorithm going to test if there is the thirteenth friday in that month or not. Your program doesn't have any reference for the year and without that there is no way to check the … | |
Re: [B]Why do you want to do it ? And what have you done ?[/B] ask this to yourself always before asking for help here !!! | |
Re: Well there are a whole lot of symbols which are quite interesting !!! Like the third letter of English alphabet . When used as "c" it is the fastest speed attained ever in the world.( of course only by photons ;) ) and when treated as "C" it becomes jephtahs … | |
Random numbers are so important that sometimes at some point we do feel "Are the random numbers really generated randomly?" and "Can such an important topic be really left to chance?".What do you guys feel is the answer to this? | |
Re: Well have patience,a fruit tree needs years of care before it gives us tasty fruits.Same is with programming. Well if you are just trying out to create some windowed interface for your game then IDE's like Dev-Cpp,CODE-Blocks etc directly make it for you on their own without much effort.But if … |
The End.