381 Posted Topics
Re: This is off-topic, but it is good thing to know. 2^n can be easily done by using bitwise operator. [code] a = 1; a =<< n; [/code] | |
Re: [QUOTE=umamaheswari;504514]hai to all daniweb community members, i need some nice websites on c# because i am new to this.[/QUOTE] Do you know that Daniweb also have C# forum section: [url]http://www.daniweb.com/forums/forum61.html[/url] | |
Which part of the world are you from? I am from Asia. | |
Re: Every steps we move, the world is changing. Even when you drive, you change the world by emitting the CO2 into atmosphere. Even without human being, the world is still changing. | |
Re: Sorry, I cannot vote any of them because I don't want any of them to happen. | |
Re: [COLOR="red"][B]KID DO NOT CLICK ON THAT LINK, IT CONTAINS NOTHING BUT A BEAUTIFUL VIEW THAT SHOULD NOT BE SEEM BY A UNDER-AGE.[/B][/COLOR] | |
Re: Instead of writing code for you, I would introduce you to the Number System. Nowaday, there are 4 type of numbers that are commonly use: Decimal (base 10), Binary (base 2), Octal (base 8) and Hexadecimal (base 16). Decimal is what we are using everyday, and Binary, Octal and Hexadecimal … | |
Re: [COLOR="Red"][I]1) Is the programmer human or more like robot ?[/I][/COLOR] Human programmer is a living thing where robot is not a living thing. [I][COLOR="Red"] 2) Can robot love somebody ?[/COLOR][/I] Robots were programmed with a purpose, if the purpose of robot was to love somebody, then of course it will … | |
Re: You need 3 files: [B]golf.h[/B] contains the functions declaration. [B]golf.cpp[/B] contains the definition of the function in golf.h [B]main.cpp[/B] contains the main() function | |
| |
Re: I would start my own company, it was my dream. Enjoy my life as much as possible | |
Re: [QUOTE=TheNNS;507902]I wish I had a double stacked steak and cheese subway sandwich on italian bread. toasted.[/QUOTE] I wish I had a sweet cold ice cream and a hot girl. | |
Re: Logically speaking, [icode]p < p + n[/icode] is always true when [icode]n[/icode] is greater or equal to zero. | |
Re: The most common way to find the biggest number, is creating a variable, which is called [icode]max[/icode], for storing the first element of the array. Run throught the entirely array and check whether there are any number that are bigger than our [icode]max[/icode] variable. Whenever we found any number that … | |
Re: I have go throught all your code neither; however, I just feel that your code is too long to produce the tic-tac-toe game. | |
Re: It's good except that his song was terrible plus his sub-title was too fast. | |
| |
Re: [QUOTE=rajatC;505773]"\r" is for enter key and "\n" is for line feed...correct me if i am wrong.. and if not please tell me what is a line feed?? why it is used with "\r"?? [/QUOTE] [B]\n[/B] Newline. Position the screen cursor to the beginning of the next line. [B]\r[/B] Carriage return, … | |
Re: [icode]std::cout[/icode] and [icode]std::endl[/icode], I believe. | |
Re: Here is my understanding; however, I am un-sure if it's correct. [code]Pet mypet;[/code] You declare mypet as Pet, so the computer will reserve a suitable memory for your variable. [code] ------------------------------------------------------------------- -----0000000000000000000000000000---------------------------------- ------------------------------------------------------------------- -------------------------------------------------------------------[/code] [code]Pet mypet = new Pet();[/code] You declare mypet as Pet, and you allocate another memory for … | |
Re: I would use array for store the number of alphabet that we found in the string. Start to count from the first character of the string till the last character of the string. You should also count the space because space can determine how many words in your string. | |
Re: Learning is very easy, understanding is moderately easy, applying is quite difficult. | |
Re: First, create a new project then start to code. | |
Re: [COLOR="Red"][I]* Hit guitarrick with a brick *[/I][/COLOR] | |
Re: You mean: [code] do { ..... } while (kbhit() != ' '); [/code] | |
Re: [QUOTE=Narue;503250]> >i don't know how to make the number be between 0 and 100 only [ICODE]rand() % 100[/ICODE] is the easiest way, and it should suffice for basic pseudorandom numbers.[/QUOTE] I believed, [ICODE]rand() % 101[/ICODE] would generate number between 0 and 100 | |
Re: [code] cin.getline(p,50); [/code] The reason why it does read only 49 characters because the computer need the last character to be a NULL character. | |
Re: [I] im trying to make a function that will fill an array with numbers but s[B]omething seems to be wrong[/B] =\ its suppose to be cards....[/I] ----------------------------------- What's wrong? it doesn't run as you expect or it shows the error when trying to compile? | |
Re: [QUOTE=Cyb3rAssasin;502556]personally in my experience the best compiler i have found is dev-c++ its free and its the fastest.[/QUOTE] Personally, I would choose Code::Block over Dev-C++ ![]() | |
Re: The file that you attempt to read is not exist. To track this kind of error, I would suggest you to use std::cout inserting method. [code] void ReadFile() { char fname[13],ch; cout<<"Enter filename : "; cin>>fname; strcat(fname,".mth"); [COLOR="Red"]cout << fname; // to check what string the fname has.[/COLOR] temp.open(fname,ios::in|ios::nocreate); if(!temp) … | |
Re: How about this? [CODE] // Menu.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include<stdio.h> #include<stdlib.h> #include<conio.h> #include<iostream> using namespace std; void opcio1(); void opcio2(); void opcio3(); void main(){ char sel; do { cout <<"Sudoku\n\n\n"<<endl; cout <<"1. How to\n\n"<<endl; cout <<"2. Sudoku generator\n\n"<<endl; cout <<"3. Play!\n\n"<<endl; … | |
Re: [code] if (board[rownum-1][colnum-1] == 'X' [COLOR="Red"]or[/COLOR] board[rownum-1][colnum-1] == '0') [/code] What language are you using? [code] char board[ROWS][COLUMNS]= { {'.' , '.' , '.' , '.' , '.' , '.' , '.' , '.' , '.' , '.' , '.' , '.' , '.' , '.' , '.' , '.' … | |
Re: [url]http://www.program-transformation.org/Transform/VisualBasicDecompilers[/url] | |
Re: [QUOTE=sivaslieko++;500859]I have such an loop: [code=c] int i = 1230; while(i<1300){ int k = 0; Flight removedItem = RemoveQ(&Item); if(removedItem.C_TIME <= 1230){ k = k + 1; printf("%d", removedItem.C_TIME); } i = i + 5; printf("%d", removedItem.C_TIME); [COLOR="Red"]// it prints correct values here[/COLOR] } [/code] Why the if statement does … | |
Re: Wrong section, goto [B]Software Development -> Visual Basic[/B], and post there, you might get better chance of getting answer. | |
Re: [QUOTE=jacques95;443177]Is it possible to make a c++ game?[/QUOTE] First of all, this question has been asked by a lot of people already; yet not many of them have successfully achieve their goal. This question is years away from the achievement point. | |
Re: [B]You scored 9 points out of 30 possible. That is 30 percent. [/B] I got this score by close my eyes, chossing the second choice always. | |
Re: [QUOTE=zino100;501548]I know a few, like C++, Pascal, SQL and some web based application, but i dont know which one is best suited.[/QUOTE] If you have some knowledges about web programming, I would suggest you to use PHP or ASP . If you don't have any knowledges with web programming, VB2008 … | |
Re: [code=cplusplus] cin >> a; for(int b; b=1; b--); b = a; [/code] The b is already declare once at the first of the function; you seem to declare it again which cause the syntax error. Moreover, you failed to use [I]for loop[/I]. Here is the syntax of for loop: [B]for( … | |
Re: [B]Off-topic:[/B] Why declare one element array of char? [code] char class_name[NAME_LENGTH],[COLOR="Red"]choice[1][/COLOR]; [/code] | |
Re: Self-document code is not only comments what the code does but also the concept of the code. To give you an idea of how to comment, I write a small example of code with comments. [I](I'm not a professional at commenting and I'm also not a good-english writer and speaker, … | |
Re: [code] string input = [COLOR="Red"]Add[/COLOR]; [/code] Add is undeclare variable. I know you want to assign string of "Add" to [I]input[/I], so you change it to "Add". (Remember "...." is string, without those double quote, it is a variable) [code] if (Add) [/code] What kind of condition is that? What … | |
Re: Invent the program which read a file that contains those codes and write a new file with no number at the beginning of the line. To do this, you should this article: [url]http://www.daniweb.com/forums/thread6542.html[/url] | |
Re: You don't need to convert because [I]char[/I] is already an integer(8bit integer). You can directly assign it to integer. [code] for(i = 0; i < 100; i++) num[i] = ch[i]; [/code] | |
Re: [QUOTE=WaltP;497689]What's this world coming to?[/QUOTE] Coming to an end. | |
Re: [QUOTE=superjacent;500223]You're on the right track. Another solution would be to use only one [icode]for loop[/icode] and use an [icode]if else[/icode] test condition to test for the first 25, do whatever...[/QUOTE] If you want to use only one loop, you don't need to use condition. [code] for(int i =0; i<25; i++) … | |
Re: [code] while((c=getch())!='\0') { [/code] The [I]getch()[/I] get a single character from keyboard. There is no NULL key button in our keyboard, so the condition is always true. | |
Re: Very difficult. |
The End.