518 Posted Topics
I have read prior post on the forum but I came up with few specific questions about Porting Unix Socket(hereby calling it BSD socket) to Win32 Platform : First of all, I am a native Linux C/C++ Programmer. I program in Ubuntu with GCC. But, I usually also port my … | |
Re: Look, Here's the key: If you do dont provide any constructor to the Class, the compiler generates, automatically, a defalt no-argument constructor. But, if define even one constructor yourself, the compiler won't generate any constructor for you. Saying this, I mean that if you defined a 2 argument constructor and … | |
Re: I guess you want to count the number of vowels, consonants etc. Good, you are almost there, lets look what wrong you did. I am referring to your orignal code. [CODE]cin.getline(len i,80);[/CODE] This is totally wrong, the syntax is [CODE]cin.getline(cstring,MAXINPUT)[/CODE] So, in your case it should have been[CODE] cin.getline(line,80);[/CODE] Next: … | |
Re: What are you trying to accomplish? Can you be more descriptive? | |
Re: You want to actually find out the PRIME factors i.e. expand the number as the product of prime numbers(2,3,5,7...) So the easiest way would be what has been told by WaltP. | |
Re: If you are using C++ <string> [code=c++] string s1; cin>>s1; fstream fio(s1.c_str(), ios::in | ios::out | ios::binary | ios::trunc); [/code] But if you are using an old compiler, Like Turbo C++[I](although, I recommend you to switch to a new compiler, Read the Article :[url]http://cppdb.blogspot.com/2008/10/why-you-shouldnt-use-you-use-old-c.html)[/url][/I] [code=c++] char s1[50]; cin>>s1; fstream fio(s1, … | |
Re: pos+1 ?? should it be pos-1? For say if array is int arr= {5,4,8,7} and you are checking at position 4 i.e 7, then you should do arr[3] and no arr[5] since arr[3]=7 also, arr[5] is not equal to 7 but it contains some junk values!! so just change pos+1 … | |
Re: this pointer has its own use: first of all if you are dealing in a big project, you may use the convention this-member to differentiate between the member of the same global identifiers. Moreover, it increases the readability of the code. Secondly, you may like to use it if u … | |
Hi, and here i am throwing a "not the exact version" of my problem, but if this is been solved, my problem is done. Lets suppose i am building a application in c++ that will simply display the content of a text file. I absolutely can make the app take … | |
Re: want 200 digits or more ?? Here Dude, Your Problem Solved. I got your answer on [url]www.ittb.co.nr[/url] while I was asking there experts to for an 200 digit calculator. So Here is the link to your problem. My advice is that you read completely. [url]http://ittb.pcriot.com/forum/viewtopic.php?t=23[/url] | |
Re: Actually it is not function overloading. In Function overloading the return type and argument type is often different. It is more versatile and a different defination(i.e. different sets of instruction for same function) is been called. Wherein in the default argument, only one defination is there. The default argument are … | |
Re: [QUOTE=jacknight;463012]I searched the forums but I didn't find any useful information. I am just trying to write a simple recursive solution to do F(n). It seems simple to me but I am probably not thinking about it correctly. My program has no errors, but it only returns 55 and then … | |
Re: [QUOTE=gehad3003;463112]hi can any one help with Mersenne Prime numbers calculator. A prime number is defined as being a Mersenne Prime if it is of the form 2^n – 1, where n is any integer greater than 1 display all the Mersenne primes from 2 through 1,000,000. Your results should be … | |
![]() | Re: [QUOTE] [CODE] switch(chii) { 'A' : strcpy(second1,"8F "); // Gives error here strcpy(second2," "); break; 'B' : strcpy(second1,"88 "); // Gives error here too!! strcpy(second2," "); break; 'C' : strcpy(second1,"89 "); // Gives error here too!! strcpy(second2," "); break; 'D' : strcpy(second1,"8A "); // Gives error here too!! strcpy(second2," "); … ![]() |
Re: Here is the improoved version [QUOTE] #include<iostream.h> void main(){ int n; do { cout<<"\Enter a Value bigger than 53: "; cin>>n; }while(n>53); for(int i=7,j=0;i<n;i+=2,j++); cout<<"\nThere are "; cout<<j; cout<<" odd number between 6 and"; cout<<n; } [/QUOTE] | |
Re: I got the answer to your problem. It is one the website [url]www.ittb.co.nr[/url] the actual link is : [url]http://www.ittb.pcriot.com/forum/viewtopic.php?t=23[/url] I hope you will be happy to see the solution. | |
Re: I got the answer to your problem. It is one the website [url]www.ittb.co.nr[/url] the actual link is : [url]http://www.ittb.pcriot.com/forum/viewtopic.php?t=23[/url] I hope you will be happy to see the solution. | |
Re: change the lines : num = a/num; den=a; to num = num/a; den= den/a; I hope it helps |
The End.