381 Posted Topics

Member Avatar for chihuyu

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]

Member Avatar for technogeek_42
0
124
Member Avatar for umamaheswari

[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]

Member Avatar for fth527
0
51
Member Avatar for invisal
Member Avatar for amithasija

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.

Member Avatar for Estella
0
116
Member Avatar for zandiago

Sorry, I cannot vote any of them because I don't want any of them to happen.

Member Avatar for Ene Uran
0
205
Member Avatar for The Dude

[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]

Member Avatar for The Dude
0
84
Member Avatar for maHvic

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 …

Member Avatar for invisal
0
202
Member Avatar for kv79

[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 …

Member Avatar for vegaseat
0
120
Member Avatar for eesti44

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

Member Avatar for eesti44
0
141
Member Avatar for Chaky1
Member Avatar for zandiago

I would start my own company, it was my dream. Enjoy my life as much as possible

Member Avatar for sneekula
0
455
Member Avatar for TheNNS

[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.

Member Avatar for sneekula
0
170
Member Avatar for Esmerelda

Logically speaking, [icode]p < p + n[/icode] is always true when [icode]n[/icode] is greater or equal to zero.

Member Avatar for Esmerelda
0
132
Member Avatar for austinslik
Member Avatar for smile!

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 …

Member Avatar for wamuti
0
113
Member Avatar for xdream

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.

Member Avatar for xdream
0
172
Member Avatar for kafkas
Member Avatar for ithelp

It's good except that his song was terrible plus his sub-title was too fast.

Member Avatar for jaepi
0
136
Member Avatar for ShawnCplus
Member Avatar for ukerbel
0
158
Member Avatar for uthnim

[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, …

Member Avatar for Duoas
0
140
Member Avatar for mrjoli021
Member Avatar for mrjoli021
0
197
Member Avatar for wijitha

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 …

Member Avatar for invisal
0
91
Member Avatar for tehprince

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.

Member Avatar for WaltP
0
131
Member Avatar for Red Horse

Learning is very easy, understanding is moderately easy, applying is quite difficult.

Member Avatar for invisal
0
96
Member Avatar for kaly45
Member Avatar for guitarrick
Member Avatar for MG2008
Member Avatar for MG2008
0
110
Member Avatar for nemoo

[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

Member Avatar for rajatC
0
244
Member Avatar for HelloFromHell

[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.

Member Avatar for HelloFromHell
0
111
Member Avatar for dv1r

[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?

Member Avatar for Narue
0
177
Member Avatar for frank_hugo_1100

[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++

Member Avatar for GreenDay2001
0
90
Member Avatar for Karkaroff

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) …

Member Avatar for Karkaroff
0
310
Member Avatar for Srynx

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; …

Member Avatar for CPLUSCPLUS
0
672
Member Avatar for thetechguy

[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]= { {'.' , '.' , '.' , '.' , '.' , '.' , '.' , '.' , '.' , '.' , '.' , '.' , '.' , '.' , '.' , '.' …

Member Avatar for thetechguy
0
734
Member Avatar for Duki

[url]http://www.program-transformation.org/Transform/VisualBasicDecompilers[/url]

Member Avatar for AndreRet
0
216
Member Avatar for sivaslieko++

[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 …

Member Avatar for dubeyprateek
0
204
Member Avatar for Njekwa

Wrong section, goto [B]Software Development -> Visual Basic[/B], and post there, you might get better chance of getting answer.

Member Avatar for invisal
0
119
Member Avatar for jacques95

[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.

Member Avatar for sneekula
0
159
Member Avatar for The Dude

[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.

Member Avatar for invisal
0
59
Member Avatar for zino100

[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 …

Member Avatar for invisal
0
299
Member Avatar for limac

[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( …

Member Avatar for rajatC
0
216
Member Avatar for Archimag

[B]Off-topic:[/B] Why declare one element array of char? [code] char class_name[NAME_LENGTH],[COLOR="Red"]choice[1][/COLOR]; [/code]

Member Avatar for n.aggel
0
122
Member Avatar for Karkaroff

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, …

Member Avatar for Karkaroff
0
248
Member Avatar for limac

[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 …

Member Avatar for Rippie
0
268
Member Avatar for zoner7

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]

Member Avatar for Jishnu
0
183
Member Avatar for pavitragupta

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]

Member Avatar for Jishnu
0
142
Member Avatar for Jishnu

[QUOTE=WaltP;497689]What's this world coming to?[/QUOTE] Coming to an end.

Member Avatar for invisal
2
193
Member Avatar for bis student

[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++) …

Member Avatar for invisal
0
4K
Member Avatar for sa-al

[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.

Member Avatar for invisal
0
116
Member Avatar for sara_84

The End.