15,300 Posted Topics
Re: `scanf_s("%i", &a[*counter]);` scanf() expects the first parameter to be a pointer, so you have to add the pointer operator &. | |
Re: >The line static int x = 10; is only executed during the first call to the function, The value of static variables is set at compile time just like all other global variables. >In Main, the line fun() = 30; is the first call to the function and so x … | |
Re: Which part(s) of the assignment do you want help with? I see you haven't yet added code to sort the array. There are a lot of sorting algorithms, the simplest one top code is the[ bubble sort.](http://mathbits.com/MathBits/CompSci/Arrays/Bubble.htm) | |
Re: If you want to just search for string2 as a whole word then after getting the pointer from strstr() check the character just before the pointer and the character just following the end of the word in string2. For example is string2 = "Hello" then check the character immediately before … | |
Re: [Here](http://www.penguin.cz/~literakl/intel/m.html#MUL) and [here](http://www.penguin.cz/~literakl/intel/s.html#SAL) are a couple charts that tell you the clock cycles for the MUL and SFL/SHR instructions on the 80X86 family of processors. The shift operation is less than 1/4th the time of the multiplication instruction. How the compiler will optimize the multiplication operator is dependent on the … | |
Re: The Expess version of Visual Studio is also free. | |
Re: I love [this free tutorial](http://www.homeandlearn.co.uk/NET/vbNet.html), see Chapter 13 for database | |
Re: I just finished installing Pale Moon to see what it's like, I'm using it right now. I had it import all bookmarks and cookies from Chrome. The only problem I see so far is that the LOG OUT button doesn't do anything. All other buttons and menu items work ok. | |
I have Windows 7 Ultimate installed, then installed most recent version of Debian on an unallocated 100GB partition on the primary drive (on a PC, not on a notebook). That all works without a problem. The problem is that I can not figure out how to change the boot menu … | |
Re: srand() should only be called once during the lifetime of the program. You should move line 147 to the beginning of main(). line 78: If the correct answer is alphabetic between 'A' and 'Z' why do you want the guess to be a numeric value? If the expected value is … | |
Re: The return value of each of those functions may be incorrect. All they have to do is return res, they don't have to create another object MixedExpression MixedExpression::add(MixedExpression op) { MixedExpression res; res.a = a + op.a; res.b = (b * op.c) + (op.b * c); res.c = c * … | |
Re: > The 2011 revision of C eliminated gets; it's no longer required to be supported, and any use of it makes your code non-portable. Rejoice! Maybe yes, and maybe no. Universities are still teaching with ancient Turbo C compiler after 30 years extinct. How soon sill they get around teaching … | |
Re: IMO being the owner of a business sucks. You, and no one else, are responsible for all the good things as well as all the bad things. If you are also an employer then you also have to be head of Personnel, that is you have to hire, fire and … | |
Re: If you google for that term I think it is the same as an ordinary live band that plays at weddings. | |
Re: If all you want to do is find out how long it takes to transverse a linked list of 1 billion nodes then you can do it with a sample of say 1 million nodes then, in a loop, transverse it 1,000 times. Start the timer before beginning the loop … | |
Re: I think it was just a judgement call whether to put it under Software or Web development, it could have been placed under either category. ![]() | |
Re: No -- it's impossible to get that precision in operating systems such as MS-Windows and \*nix. You need a real-time os such as MS-DOS 6.X in order to do that. I recall reading about some 3d party add-ons to turn MS-Windows into real-time os, but the cost a lot of … | |
Re: what compiler and operating systems are you using? And post a few of the errors. Why don't you just call it a class instead of struct because that's what it is. structs are carry-over from C language and normally do not contain methods. Although both structs and classes are nearly … | |
Re: I think it means that you create an array of color names. The GetColor() function has an argument of the color number (index number) and returns the name of the color. For example char *colors[] = {"Red","Yellow","Green","Brown","white","black"}; char* GetColor(int index) {return colors[index];} This is just a guess - you should … | |
Re: Also stoi() throws an exception on error and your program should process it in a try/catch block. | |
Re: Line 7 looks like it's trying to put all 350,000 words into a single string?? You might be overloading the number of characters that can be put into a single string ([link](http://stackoverflow.com/questions/140468/what-is-the-maximum-possible-length-of-a-net-string)). Another problem would be memory management, each time a new word is added gto the string vb.net has … | |
Pictures are better than words, so please see the menu text behind the purple ribbon in the thumbnail. I'm on Chrome Windows 7.  | |
Re: The reason yours doesn't look like a triangle is because you need to print spaces before the asterisk. There's also a space between each asterisk. So in Trianble 1 might look like this bb\* b\*b\* \*b\*b\* Where 'b' is a space I also think the user input needs to be … | |
Re: use regedit to see what permissions are set for the sub-key where you want to create a new key. You might not have permissions to do that. | |
Re: Do that assignment one step at a time. First step is to create the class with the required data items. After that, do each of the other steps one at a time. If you have specific questions then post the code you have written and ask the questions. | |
Re: What compiler and operating system? Have you used your compiler's debugger to single step through the program so that you can see what's happening? You have not provided enough code to enable us to make any knowledgable comments. Attach the entire file(s) to your post so that we can test … | |
![]() | |
Re: The Ultimate upgrade isn't really worth the effort anyway. The only difference between Pro and Ultimate is the ability to encrypt folders and files. Unless you have a lot of super secret stuff on the computer there is no need for it. | |
Re: Depends, there may be many more transfers for some databases. Example: if the database is SQL running on another computer across the internet. That could require hundreds of transfers all over the world to get to the final database. Even if the database is a simple text file on your … | |
Re: You need to post the code. | |
Re: All you had to do is hit he Flag Bad Post link and report it to the moderators. | |
Re: Note sure myself, but [here](http://msdn.microsoft.com/en-us/library/bb613568.aspx) is one place to start | |
Re: How do you get that output from that input??? Your teacher must have given you some instructions on how to do it because the example you posted makes no sense. | |
Re: Have no idea what an .afi file is, but to make a program work only during trial period the program needs to check a computer clock time/date against the install time/date. It's too easy for people to just change the computer's clock in order to circumvent the trial period so … | |
Re: What does s1 point to on line 15?? It points to the end of the string, not to the beginning and that's why it doesn't work. You can't change the value of the poiter if you intend to use it again. Line 15 needs to return s, not s1, because … | |
Re: Code::Blocks with MinGW compiler is the IDE/compiler I recommend for new programmers because it's not nearly as difficult to learn as Microsoft Visual Studio. Also because at some point you will probably want to move on to \*nix, VC++ is only supported on MS-Windows while Code::Blocks is supported on both … | |
Re: >>I am willing to pay $30/£20 for anyone to help me. I don't work for less than $1,000,000/hour :) And payment must be in my paypal account before I'll start work. | |
Re: When you say "it doesn't run to completion", where exactly does the program stop working? Which version of Dev-C++ are you using? | |
Re: lines 19 and 22 are wrong. How about other versions of yes, such as yEs and yeS and yES? It would be a lot easier to just convert rndnum to all upper or lower case characters then check for that. `if ( rndnum == "Yes" || rmdnum == "yes") ` | |
Re: Do you know how to connect and use a database that is on the same computer as the program you need to write? Once you get that going moving the database to a different computer is trivial. It's all in the connection string, just add the IP address of the … | |
Re: the first mistake is line 13: you are allocating an array of fsize number of pointers -- why??? If the file size is 1 Meg do you really need 1 million pointers? A much better and more efficient way to do it is to use a linked list of lines, … | |
![]() | Re: Won't do any good -- [here's why](http://www.daniweb.com/community-center/daniweb-community-feedback/threads/463843/how-many-post-complete-i-put-signature-in-our-community-#post2022186) And be awful careful about posting ads in the body of a post, a moderator might just hit you with a spammer infraction. ![]() |
Re: Press Flag Bad Post button on your post and tell a moderator what you want edited. | |
Re: [Here's](http://windows.microsoft.com/en-us/windows-vista/copy-files-to-another-computer) how to copy files from one computer to another on the same network. Software programs are another thing -- you should just install them on the new computer as mentioned previously by rubberman. | |
Re: My computer is about 1 1/2 years old and has an 8-core AMD processor -- runs Diablo III online very very well. The more cores the motherboard has, the better (IMO). I also have 2 hard drives, one is 1TB and the other external is 3TB. You need a 64-bit … | |
| |
| |
Re: First you need to ask yourself "what are the type rules?" Once you know the answer to that question you can test your compiler out to see if it complies with those rules. I'm not sure myself what is meant by that question, the only way for you to find … | |
Re: Unfortunately there isn't. But it's easy to write yourself. Just search the string for the first non white-space characterr (space, tab, newline) and, when found, shift all remaining characters to the beginning of the buffer so that all white-space characters are overwritten. memmove() is a good function to shift everything … |
The End.