3,892 Posted Topics
Re: [quote=Ancient Dragon;281411]The speed of todays RAM -- mine is 2.5 Gz [/quote] Speed of RAM....2.5 GHz ? I thought it was still in MHz ;) The latest one is I think 333 MHz. Maybe you wanted to say Processor speed. | |
Re: [quote=joeprogrammer;280942]Don't use [inlinecode]void main[/inlinecode]. It's old and outdated, and so instead you should use [inlinecode]int main[/inlinecode].[/quote] void main( ) never was a C / C++ standard right from the interception of the language. [quote=faq lite] main() must return int. Not void, not bool, not float. int. Just int, nothing but … | |
Re: I like the fomat of tutorials of [URL="http://www.cplusplus.com/doc/tutorial/program_structure.html"]this site[/URL], maybe this should help as a guideline for you. Also just wanted to let you know that your site takes a bit too long to load. Maybe its jsut my computer or something but just wanted to let you know .... … | |
Re: What have you attempted till now ? There are many examples in the forum on the same topic, you can go through them. One of them is [URL="http://www.daniweb.com/techtalkforums/showthread.php?t=38400&highlight=decimal+to+binary"]here.[/URL] | |
Re: Also MasterBlast, use code tags to post your code since it makes the code easier to read as well as the formatting is maintained. Read the forum announcements. | |
Re: Did you do exactly as you were told: [code=c] # include <stdio.h> # include <stdlib.h> # include <string.h> int main() { FILE *in_file; char dataFile[20] = { '\0' }; char date[20] = { '\0' }; char operator[30] = { '\0' } ; // you're using a C keyword! char ts[80] … | |
Re: If you have Win98 I think it can be done. Just run your program and press "Print Scr" button on your keyboard, minimize the Turbo C window, goto MSPaint and paste the image. It should work out to be fine, but dont know if the same can be done in … | |
Re: All the normal compilers will work with the SQL commands if you set up the path for header and library files and include the required header file in your prorgram. So you can continue using the compiler which you are using right now (cant say the same if you are … | |
Re: If you use C++ strings your life would be much simpler coz then you can do something like: [code=cpp] #include <string> const std::string whiteSpaces( " \f\n\r\t\v" ); void trimRight( std::string& str, const std::string& trimChars = whiteSpaces ) { std::string::size_type pos = str.find_last_not_of( trimChars ); str.erase( pos + 1 ); } … | |
Re: How about something like: [code=cplusplus] for( const std::string* str = myArray ; str != 0 ; str++ ) std::cout << *str << '\n'; std::cout << '\n'; [/code] | |
Re: For Vitsa screenshots visit this link: [url]http://www.only4gurus.com/v3/longhorn.asp[/url] | |
Re: Looks like but I think atleast one for loop can be reduced... Assign the values to the structures members in the for loop in which you display the result of your first attempt ie loop 1. [code=cplusplus] for( int i = 0; i < 12; ++i ) { std::cout << … | |
| |
Re: [URL="http://www.geocities.com/stoneeeb/codes/toecode.html"]Here[/URL] is the game in some another language, you can understand it and try to convert it to C / C++. | |
| |
Re: You have declared prn_random_fcookie( ) as [inlinecode]prn_random_fcookie( char ) ;[/inlinecode] while you have defined it as [code=cplusplus] prn_random_fcookie( ) { // you code here }[/code] As you can see the declaration and definaton dont match. Also what you need to do is to pass the function nothing, calculate a random … | |
![]() | Re: Wombats..hmm...think I have heard this word somewhere. Ah its related to Mr. DMR, coz he is the one spreading new about wombats and something about the underbush. Hehe looks like either there is some bug or one of the moderators have made the poll more interesting. :D |
![]() | Re: Be more specific, state your context and post your latest code attempt. Being vague wont help you at all. |
Re: Simple..pass by value was present way before references were introduced in C++, so to go out to say that you consider pass by reference only when a actual "reference variable" is passed is wrong. Pass by reference is done in two ways: 1. Pass by reference using pointers 2. Pass … | |
Re: Your PC is infected with tracking cookies and viruses. Try to scan with AVG trial version( lastest ) and see what it comes up with. | |
Re: [quote=mathematician;280254]As any veteran could tell you, the real "bible" for C programmers was [I]"K & R"[/I] (abbreviation), published many years ago by Prentice Hall.[/quote] ...which has a lot of typo errors. The link which Mr. Iamthwee pointed out is referred by thousands of people everyday( through Googlegroups, Daniweb or any … | |
Re: Though I dont know a lot of C++ but here goes nothing... The reason it is not working is because you have declared your vResource as [INLINECODE] vector vResource<Resource> ; [/INLINECODE] i.e. a vector of resource objects while you are trying to push a pointer to the resource type ( … | |
Re: [quote=JoBe;280389]I always wonder how you guys come up with such good links you know [/quote] Err...I hope you know that he is not exactly a 12 year kid . :mrgreen: Going into professional software development, hauting the google groups and various forums is what makes a good programmer. (and of … | |
Re: Create a [INLINECODE]switch[/INLINECODE] case in the function [INLINECODE]inputAmount( )[/INLINECODE] , accept values from the user regarding their option, [INLINECODE]return[/INLINECODE] the selected value using the return statement. Store the returned value in a variable in main and then invoke the [INLINECODE]calculateCommission( )[/INLINECODE] function using the value returned from the [INLINECODE]inputAmount( )[/INLINECODE] … | |
Re: [quote=Ancient Dragon;277432]My magic number is now 3 [/quote] Huh whats going on ? [quote]Postaholic[/quote] Reminds me of someone I know.....:cheesy: ![]() | |
Re: Err... i dont want to be caught in the middle of "Lord of the forums: battle for colored text " but in my personal opinion, [B]i completely agree with Mr. Dave. [/B]It would be really nice to see my code snippet in color rather than a dull shade of green. … | |
Re: Ternary operators anyone? [code] b = (*fp == *(fp + 1)) ? true : false ;[/code] Use the same thing for d and it should be fine. [code]variable_name = (condition) ? (if_condition_true_return_this_value) : (else_return_this_value) [/code] | |
Re: Objects are created when you declare them (when they are on the stack frame) or when they are dynamically allocated. [code=cplusplus] // object declared and created, mem allocated, default constructor called Object obj ; // object created dynamically ,default constructor called Object o = new Object( ) ; [/code] The … | |
Re: Here I have 1.3 K posts and all they do with me is give me this: Banned ;) | |
Re: [quote=sweety engineer;278730]Assume you have been offered a high-salary job in a software company that develops games for children. You have been assigned to work on developing a game that is uneducational (e.g. about fighting enemies or chasing thieves) and you believe that such a game is waste of time for … | |
Re: What happens on Thanksgiving day ? In memory of which event is this day celebrated ? | |
Re: Thread involving regards and congratulations to miss Dani usually end up being locked...hope this one doesnt suffer the same fate. [B]HBMD[/B] (happy b day miss dani) | |
Re: You must attempt something before we help you out. Paste the code which you have written till now. | |
What exactly is Group membership which appears in the control panel? Can custom Public Groups be created? | |
Re: I have read this somewhere in the context of Processor architecture. The compiler tries to align the data and the pointers along the boundaries i.e. in multiples of 4. So the addresses are given along the lines of multiples of 4. Not very sure about it but atleast this should … | |
Re: Rational Rose and Enterprise Architect -- but these are paid ones. Of course if you want to learn then these work fine. For free modelling tools which generate source code from UML and vice versa [URL="http://jude.change-vision.com/jude-web/product/community.html"]look here[/URL] BTW these tools are not called reverse engineering tools they are called Modellign … | |
Re: First of all dont use scanf() to obtain the string from user, use [search]fgets( )[/search] which is much safer option. Something like: [code=c] char buffer[BUFSIZ] = { '\0' } ; printf( "Enter the string: " ) ; fgets( buffer, BUFSIZ, stdin ) ; [/code] Also there is an inbuilt function … | |
Re: Thanks proliant fan for the read. [QUOTE=Dani] Our moderators have played a huge role in the development of the site. Without them, I don’t know where we’d be.[/QUOTE] [QUOTE=Dani]I’m so lucky to have such a great team of moderators who take the burden off of constantly keeping up with the … | |
Re: In your first do while loop the condition you have used is [INLINECODE] while( trks < nums )[/INLINECODE] WHen the program control enters the loop the value of [INLINECODE]trks[/INLINECODE] is already 1 and the condition you are using is [INLINECODE]while( trks < nums )[/INLINECODE]. So if the user enters that … | |
Re: [quote=mathematician;278853]At the risk of sounding as if I have got a big head, I'm sure I'm right. I suppose have been writing C programs since about 1987, and usually they are between 20 and 30 thousand lines long. But I hate to make a fool of myself, so I have … | |
Re: [quote=WolfPack;273559]using balls as brakes.[/quote] Wonder how long will they last if done so.....:twisted: | |
Re: [quote=johnpeter1989;277905]iand, for my information does [inlinecode]*(ptr+1)[/inlinecode] do the job. coz the aray is of type int which most probably takes two bytes. so isnt it supposed to be [inlinecode]*(ptr+2)[/inlinecode] or just [inlinecode]*(ptr++)[/inlinecode][/quote] No, the pointer arithemetic takes care of the inrement for you once you mention the pointer type. Hence … | |
Re: Post a sample of the data you are using and any reason why the data is in so complicated a format ? | |
Re: [quote=kipl20;278757]hi i need to write a while loop to print out groups of stars shown in the attachment the middle set?? cud someone provide me with an answer please as i am desperate to get it working. thanks in advance[/quote] Hmm looks like you didnt like my answer [URL="http://www.daniweb.com/techtalkforums/thread61192.html"]here[/URL], you … | |
Re: [quote=Sin-da-cat;278304]P.S. I'm asking because I want to arange my list of music albums, because right now, the names are held in a completely sporadic manner in a Word document.:cheesy:[/quote] Copy and paste the contents of the word file in a clean text file to avoid unnecessary hassles. I dont think … | |
Re: Yes you can have NTFS on one partition and FAT32 on another though not a good thing -- go with NTFS only. Still if your question is that can Win ME and Win XP coexist the answer is yes. You can have both of them on the same HDD. | |
Re: [quote=WolfPack;275889]All my dreams are in black and white... Do any of you dream in colour?[/quote] Same here, all in black and white. And what more, the dreams are hazy, cant see them very clearly.. :cheesy: | |
Re: I dont think so, its too old. VS 5 -- VS 6 -- .NET 2003 -- .NET 2005 It must be having a lot of problems. But why not use the free IDE's out there ? Why are you so intent on using MS products ? Does your project involve … | |
Re: Just sayign doesnt work wont do. Are you getting compile time errors, run time errors, program not functinoning as you expected ??? Explain your problem in detail and the things you are experiencing. [edit] Ah Mr. Salem has already brought down his MOD stick on the guy ;) [/edit] |
The End.