- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 2
- Posts with Downvotes
- 2
- Downvoting Members
- 1
17 Posted Topics
Re: Have a look at the ncurses library [URL]http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/[/URL] K. | |
Re: [code]cout<<"The upper case character corresponding is"<<endl;[/code] you are not outputting ch. besides this there are some "else" missing. and you should not use the old headers K. | |
Re: [URL]http://www.libpng.org/pub/png/libpng-1.0.3-manual.html[/URL] K. | |
Re: I would try it this way: [CODE]#include <iostream> static int is_valid_function_name(const char *function_name_string){ for( ; *function_name_string !='\0' ; function_name_string++ ){ switch (function_name_string[0]) { case '?' : case '/' : case '\' : case ':' : case '*' : case '<' : case '>' : case '\"' : return 0; default: … | |
Re: after playing with your code [CODE] #include<iostream> using namespace std; const int n_row =26; const int n_col= 2; const char tarray[n_row][n_col]= { {'A', '?'}, {'B', '!'}, {'C', '.'}, {'D', ';'}, {'E', ':'}, {'F', '|'}, {'G', '^'}, {'H', ','}, {'I', '%'}, {'J', '$'}, {'K', '>'}, {'L', '<'}, {'M', '='}, {'N', '['}, … | |
Re: try this [CODE] char result; result=(int)(ceil(r+(2.6*m-.2)-2*c+d+(c/4.0)+(d/4.0)))%7; [/CODE] K. | |
Re: [CODE] while(int(newPin.length) != 4); [/CODE] should be [CODE] while( newPin.length() != 4); // length() is a memberfunction of string [/CODE] K. | |
Re: I think your main problem is here [CODE]//and I allocate memory as dxf =(struct dxfdata *)malloc(sizeof(struct dxfdata)); dxf->ptrgeometry = (struct geometry *)malloc(sizeof(struct geometry)); temp = dxf; // here you are assigning dxf to temp; temp->ptrdxfdata = NULL; temp->ptrgeometry = NULL; // dxf->ptrgeometry is lost now // you are actually setting … | |
Re: [QUOTE=Dave Sinkula]Oh, wait! Are you compiling C++ code in a C compiler?[/QUOTE] I was wandering the same thing [CODE]#include<iomanip.h>[/CODE] ==> C++ code. [CODE]sizeof(struct record)[/CODE] ==> C code ?? . | |
Re: I do not really understand the problem that you have. But a few explanations might help [CODE]if (ID >= 0) { return true; // you're returning from the call here bool isValidStatus; // this statement is never reached // here you are declaring a boolean variable isValidStatus. // this is … | |
Re: [url]http://www.daniweb.com/techtalkforums/announcement.php?f=8&announcementid=2[/url] | |
Re: [QUOTE=Chainsaw] Sheesh. Naru was right about me! Lazy AND stupid![/QUOTE] There is no need to take Naru's comments too serious. | |
Re: [QUOTE=Narue] ...You're confused. There are two potential representations for the value returned by sin, radians and degrees. sin as defined by the standard returns radians and it's trivial to convert radians to degrees, just multiply by 180 / pi. As for decimal numbers, I assume you mean floating-point, which is … | |
Re: Hi Your calculation of the percentage is wrong. e.g you want to add 10% you write [CODE] f_ccost = f_acost + 10.0/100;[/CODE] but it should be [CODE] f_ccost = f_acost + f_acost*10.0/100;[/CODE] K. | |
Re: [CODE]void calculate_total (total) { cout << total; }[/CODE] has to be [CODE]void calculate_total (float &total) { cout << total; }[/CODE] about the warnings: your compiler interprets literals like 0.75 as double. K. | |
Re: is that what you want ? [CODE]#include <iostream> using namespace std; int main() { int number, c, d, e; cout << "Enter a Positive Integer from 0 to 999." << endl; cin >> number; while ((number < 0) || (number > 999)) { cout << "Error: Negative Number or Number … | |
Re: I know that I'm breaking the rule not to make anybody's homwork. But since the answer is so simple I can not help it to post a solution [CODE]#include <iostream> double fakt(int i) { if ( i == 1 ) return 1.0; return fakt( i -1 ) * i; } … |
The End.