15,300 Posted Topics
Re: What coding? Just copy the files to another hard drive. | |
Re: >im afraid if i understood this assignment unproperly: Seems pretty clear assignment to me. What part don't you understand? Since you have to work with each digit of the number it would probably be easier to get the number as a string instead of an integer. It can be done … | |
Re: Dev-C++ is nothing more than an IDE -- it's not a compiler. MinGW is the compiler that is supplied with Dev-C++, same compiler that is supplied with Code::Blocks IDE. And MinGW is the Windows port of \*nix gcc and g++ from GNU. | |
Re: [Here](http://www.amazon.com/s/?ie=UTF8&keywords=visual+studio+2013&tag=googhydr-20&index=aps&hvadid=27634687687&hvpos=1t1&hvexid=&hvnetw=g&hvrand=20875496881860501544&hvpone=&hvptwo=&hvqmt=b&hvdev=c&ref=pd_sl_oadshh8sx_b) are some books that may help you. Experience is probably the best teacher. IMO most of the features of Visual Studio are just fluff, the best and most useful feature is it's debugger. One feature I don't like is it's dockable windows -- I'm always accidently undocking one of … | |
| |
Anyone know where to BUY (not steal) this eBook? I don't want paperback because they are too difficult for me to read. I'd rather have eBook or PDF version so that I can change the font size to whatever I want. I've looked at Addison-Wesley web site but don't see … | |
![]() | Re: What are you confused about? for i ← 0 to n − 1 do In c++ this would be `for(i = 0; i < n-1; ;)` or it could be coded as a do loop int i = 0; do { // something } while( i < n-1); |
Re: There are lots of sorting algorithms, c++ even has one. Are you allowed to use the standard c++ std::sort function? If not, then probably the simplest one to code is the [bubble sort](http://en.wikipedia.org/wiki/Bubble_sort). The bubble sort is among the slowest of the sort algorithms, but for small sets of data … | |
Re: I'd recommend you learn VB.NET instead of a 15-20 year old compiler like VB 6.0. You can get VB.NET Express for free, just download it from Microsoft. There are lots of online tutorials for it too. \ See [this wiki article](http://en.wikipedia.org/wiki/Visual_Basic) about history of vb. | |
Re: Is input[1] just a single numeric digit? If it is, then you don't need any conversion program, just subtract '0' to convert it to integer. For example: char input[] = "X1"; int x = input[1] - '0'; | |
Re: Do you mean the function on line 154? What constitutes end-of-line? Does the machine sending the weights append '\n' or something to indicate end-of-line? You don't have any control over that, so if you want all the weights on one line then save them into your own string when received. … | |
Re: The problem with that is FindFirstFile and FindNextFile know nothing about std::vector, or even c++. Those are just C functions. In order to make your suggestion work you would first have to resize the vector with enough entries to hold all the files that those two C functions might return, … | |
Re: you might want to display those two strings or write them to a temp file so that you can see exactly what is being sent to the database. | |
Re: I think electronic voting has been proven to be even less reliable then paper voting either because of bugs in the electronic software or hackers. It wouldn't be difficult for a programmer to write the software which auto votes for a particular candidate regardless of who the voter intended. That … | |
Re: "%c" only gets one character from the keyboard. I see the structure contains several character arrays, so "%s" is probably more appropriate. Also, it's not necessary to use & before character arrays because they are already passed as pointer by default. For example `scanf("%s",stud.vpisna_st);` | |
Re: If anyone owns the intellectual property of "Sky" is has to be American TV [NBC who ran the TV series "Sky King" in the early 1950s.](http://en.wikipedia.org/wiki/Sky_King) It was a ratio broadcase before that. | |
Re: What and where were the errors? | |
Re: If there is a WW3 it won't last long. There's enough nukes in the world to destroy the planet several times over in just a few minutes. So you won't have to worry about WW3 very long. | |
Re: I looked over the options in Visual Studio 2013 and, as far as I can tell, only MFC programs can be statically linked to the MFC dlls. None of the other program types have that option. | |
Re: If he doesn't have access to the server how is he supposed to calculate consumption? That's like me wanting to make similar approximation of the DaniWeb servers -- no way for me to do it. | |
Re: No -- there's no one here that knows how to program :) And if you believe that I have some shares in the Golden Gate Bridge that I'll be glad to sell you. | |
| |
Re: Or just do it like this: void zeroMatrix(float arr[][2]); void main() { float e[2][2]; zeroMatrix(e); } void zeroMatrix(float arr[][2]) { int i, j; for (i = 0; i<2; i++) { for (j = 0; j<2; j++) { *(*(arr + i) + j) = 0; } } } | |
| |
Re: You can't unless you also write your own file system, which I doubt you will want to do. The CD command is only good while the program is still running. After the program terminated the current directory reverts back to whatever it was before the program started. AFAIK there is … | |
Re: reverse lines 4 and 5, then lines 15 and 16. The purpose of lines 4 and 15 is to remove the '\n' from the keyboard buffer after calling scanf(). You need to do the same after line 33. | |
Re: It's still just fopen() regardless of where the file is located, for example `FILE* fp = fopen("c:\\documents\\test.txt","r");` In your program you will need to get the string as a character array because it comes from keyboard char inbuf[255]; fgets(inbuf,sizeof(inbuf),stdin); // get string from keyboard // now clear trailing '\n' if(inbuf[strlen(inbuf)-1] … | |
Re: line 14 won't work because you have to also enter the / between the numbers. Get the input as a string then parse the string to extract each of the individual parts. | |
Re: > how software is converted into electrical pulses or 0's and 1's in computer. How does the computer do it? The computer itself doesn't do it, it's converted from human readable text into computer usable instructions with a compiler or interpreter. As for your other questions, someone else will have … | |
Re: You have static data in some of the classes that also need to be declared globally in one of the \*cpp files. Static class data is just like normal global data except they contain the class scope operator. For example you might declare them in main.cpp like this example #include … | |
Re: what do you mean cd doesn't work ? Explain more about the behavior that you think is wrong. | |
Re: Change the return type of each function to return the value of c and y, then in the third function you can get those values to compare them. Something like this: int foo1() { int c = 5; return c; } int foo2() { int y = 0; return y; … | |
Re: Study and work full time with c++ for about 10 years and you will become a master at it. | |
Re: You can't make it into a switch statement. switch only works on integers, never stings. | |
Re: First do the math on paper & pencil. Once you get that right then coding it will be simple. If the hours is greater than 12 just subtract 12 and the A.M./P.M. flag will be 'P'. Otherwise if the hours is less than 12 the flag will be 'A' and … | |
Re: google for c++ keywords and you will find [this article](http://cs.smu.ca/~porter/csc/ref/cpp_keywords.html) | |
Re: There are a few errors in the code you posted, such as lines 17 and 23. Line 24 is inside the if statement that begins on line 23. | |
Re: Some compilers complain if the include files you create are in quote or angle bracks `#include "client.h"` Use quotes if client.h is in the same folder as your \*.c file(s) `#include <client.h>` Use angle brackets if client.h is in the compiler's include folder. | |
Re: >i hope it usefull for you It's not -- have no idea what you're talking about. | |
Re: This is the start of the function, now all you have to do is create two nested loops. The outermost loop iterated from 0 to 6 which displays the compainies, and the inner loop counts from 0 to 4, displaying each of the sales on the same line as the … | |
Re: I use Chrome Version 33.0.1750.146 m on 64-bit Windows 8.1 and don't have that issue. Your screenshot looks like you have two instances of Chrome, one on top of the other. Check Task Manager and see if that's the case. | |
Re: The problem is that there is no memory allocated to the members of that structure -- they are just pointers whose address is unknown. cin does not allocate memory -- that is your responsibility. Try this structure struct Student { char firstName[100]; char lastName[100]; char telephone[20]; }; line 22: why … | |
Re: >Download anything on the internet and you will have uninvited guests. Depends on where you browse and download from. If you download illegal stuff then yes, you will most likely get viruses and malware. | |
Re: "Coding Academy" -- just another catchy phrase for online tutorial. Do you have one in mind? Post a link to it so we can see what you are talking about. IMY get one of the programming books from Amazon.com or your local book store. They contain much better and more … |
The End.