I would suggest adding parenthesis "()" surrounding the multiplication parts of your equation for clarity. result = s0 + (v0 * t) + ( .5 * g * t...
I must respectively disagree with the use of fgets in C++ code, because it does not understand C++ std::string. In my view this fosters the...
You must explicitly allocate memory for a cstring in any scope in c/c++. I does not matter if it is in a class/structure, global, or local pointer.
You must explicitly allocate memory for a string in any scope in c/c++. You must first allocate memory for a pointer before using. Your example...
It seems to me that you have the "basics of c++" down, your function call all look Ok for a start. Now it's time to add the math.
This is undefined behavior. Read Stroustrup's answer to the a++ + ++a FAQ http://www2.research.att.com/~bs/bs_faq2.html#evaluation-order
The char pointer in the class can only be accessed by class members.
This looks like you are trying to install something. If so you may need 'root' privilege to install. Jim
int count_1, count_2; count_1 = 0; count_2 = 0; int next; while(fin>>next); count_1++; fout<<"The number "; So where in this code are you...
Look into the strtok() function using the '=' as the delimiter. Jim
In your main function: int main() { int principle, length_years, length_months; double annual_rate, monthly_rate_decimal; char print_header; }...
There is no standard 'C' way to do this. It is possible to do it but it is operating system dependent. So please let us know your operating...
I'm sure quite a few people know the answers. The question is: Do you?
You should only '#include' header files, NOT '.c' files. '.c' files should be added to your makefile or project to be linked into your program. Jim
If you look at "HELLO" as an array of characters: x[0] = 'H', x[1] = 'E', x[2] = 'L', x[3] = 'L', x[4] = 'O', x[5] = '\0' Your 'ptr' variable...
In int main () { system("pause"); return 0; } You are not doing anything but pausing. Maybe you need to set up variables, call a...
Are you linking the library in the project?
If you have a development kit I would start by looking at the manufacturer's web site. Since the PC has no CAN bus port, the communicating depends...
You should not be calling main() a second time. This is most likely the cause of your Segmentation fault.
Have you tried a basic math text or Google?
Separate names with a comma.