381 Posted Topics

Member Avatar for The Dude
Member Avatar for zeroground

[code] #include<stdio.h> #include<conio.h> [/code] Omit these header files because they are C header files. C++ use [I]#include <iostream>[/I] [code] double result[COLOR="Red"];[/COLOR] [/code] Make sure every statement is end with semi-color( ; ). [code] cout << "\n Enter in order x1,x2,y1,y2: "; cin>>x1>x2>>y1>>y2>>\n; [/code] To gain access to use [I]cout [/I]and …

Member Avatar for toko
0
103
Member Avatar for zeroground

It doesn't work with Code::Blocks. I think it works only in the old version of C compiler such as Turbo C.

Member Avatar for invisal
0
182
Member Avatar for HB25
Member Avatar for hkdani
0
646
Member Avatar for abu moh

Provide us some piece of code which you think it is where the error is occured, and explain your purpose.

Member Avatar for Ancient Dragon
0
68
Member Avatar for amishosh

[code=cplusplus] int k=0, i=0, c=0; while (k < SIZE) { c++; if (mat[k][i] == 1) { k++; i = 0; continue; } if (i == SIZE-1) break; i++; } [/code] Is this a Big O(n)?

Member Avatar for invisal
0
97
Member Avatar for The Dude
Member Avatar for The Dude
0
72
Member Avatar for Ene Uran
Member Avatar for Serunson
Member Avatar for AbberLine

[QUOTE=Salem;498394]> Say every 5 miliseconds. Does your monitor refresh at 200Hz ? If there is no way for you to observe the effects of such a high resolution event, then what would be the point of trying it? Besides, once you get below the normal scheduling frequency of the OS …

Member Avatar for AbberLine
0
1K
Member Avatar for AbberLine

When coding graphic game, there are two things you should know: the non-graphic part and graphic part. Non-graphic part is the bunch of variables that work in the program; Graphic part is to translate from those variables into visable graphic. Anothing thing you should know if FPS(frames per second). For …

Member Avatar for AbberLine
0
387
Member Avatar for TheBeast32

Why make your code so complicated? The most basic concept of finding prime is to test from[I] 2[/I] until [I]number-1[/I]. Once you find the divisor number of that number, then you are also able to find the factor of that number. [code=cplusplus] int factor1, factor2; bool prime = true; for(int …

Member Avatar for TheBeast32
0
108
Member Avatar for sa-al

[QUOTE=dubeyprateek;497579]There is no way (at least in C and C++) you can input a mathematical expression in the form of mathematical expression. You can only input a string and convert it to mathematical expression and [B]do the calculation[/B].[/QUOTE] No easy to do that.

Member Avatar for ssharish2005
0
89
Member Avatar for n.aggel

[B]The list of all functions in <unistd.h>[/B] [code] int access(const char *, int); unsigned int alarm(unsigned int); int brk(void *); int chdir(const char *); int chroot(const char *); (LEGACY) int chown(const char *, uid_t, gid_t); int close(int); size_t confstr(int, char *, size_t); char *crypt(const char *, const char *); char …

Member Avatar for ssharish2005
0
651
Member Avatar for jonrmoore
Member Avatar for hkdani
0
90
Member Avatar for plusplus

I am not sure because I haven't program in VB6 for so long. I think Form.Visible would be the answer because if Form.Visible = false which mean the form doesn't not appear in the screen.

Member Avatar for hkdani
0
139
Member Avatar for Karkaroff

More comments are needed to be added. [code=cplusplus] /********************************* * What is the title of your program? * * What is the purpose of this program?* * Written by who? * *********************************/ // What is this union for? union element { char sym; // what is this char for? int …

Member Avatar for n.aggel
0
302
Member Avatar for mr.cool

[code] #include<iostream> float celsius_to_fahrenheit(float); int main() { float fahrenheit; float celsius=22.5; fahrenheit=celsius_to_fahrenheit(celsius); [COLOR="Red"]std::[/COLOR]cout<<celsius<<"C="<<fahrenheit<<"F\n"; return 0; } [COLOR="Red"]float[/COLOR] celsius_to_fahrenheit(float celsius) { return(celsius*(9.0/5.0)+32.0); } [/code]

Member Avatar for Narue
0
97
Member Avatar for Curt69x
Member Avatar for Tiger909

Another solution: [code=cplusplus] #include <iostream> using namespace std; int main() { int x, y; while (true) { cout << "Please Enter a positive number\n"; cin >> x; if(0 != x || 1 != x) break; cout<<"Please try again with number other then 0 or 1\n"; } for (y = 2; …

Member Avatar for invisal
0
169
Member Avatar for lifei

[code] int [COLOR="Red"],[/COLOR]x,y; [/code] Delete the comma. [code] strFreq.MakeUpper(); strHL.MakeUpper(); if(strFreq=="x" && strHL=="y") [/code] You made those strings into upper-case and then you compare it with lower-case string.

Member Avatar for invisal
0
150
Member Avatar for MidiMagic
Member Avatar for hellokitty88

[QUOTE=hellokitty88;494492]I am reading a text file from an input file. The problem is that when I cout the text to the screen not all of the original text file is showing. The text file is large, but I was wondering if there was any way I could possibly display all …

Member Avatar for Jishnu
0
123
Member Avatar for CaninA

Well, your assignment is already well-described. It's already told you what structure and functions you need.

Member Avatar for CaninA
0
225
Member Avatar for invisal

Firstly, I got this class: [code=cplusplus] class A{ public: void show() { std::cout << "Hello World"; } } a; [/code] I am trying to get the address of [B]show()[/B] function. [code=cplusplus] int main() { void (*ptr)(); ptr = &a.show; *ptr(); return 0; } [/code] And, it doesn't seem to work …

Member Avatar for dubeyprateek
0
373
Member Avatar for revenge2

[code] if (answer == 2) {cout<<"\nThe perimeter is:" << perim << "meters\n";} [COLOR="Red"]{[/COLOR] else if (answer > 2) {cout"\nInvalid command!\n";} [COLOR="Red"]}[/COLOR] [/code] Unexpected open and close brace.

Member Avatar for rajatC
0
105
Member Avatar for HLA91

[I]Number1 % Number2 == Reminder[/I] which the reminder is always in the range of 0 to (Number2 - 1)

Member Avatar for invisal
0
730
Member Avatar for eranga262154

The [B]isspace(int ch) [/B]function returns nonzero if [I]ch[/I] is a whitespace character, including space, horizontal tab, vertical tab, formfeed, carriage return, or newline character; otherwise, zero is returned.

Member Avatar for eranga262154
0
159
Member Avatar for Lardmeister

[16:08] <Josh> tan(90 degrees) isn't infinity, right? [16:08] <Josh> it's undefined :) [16:08] <Josh> ya [16:08] <sarehu> 90 degrees is not in the domain of the tangent function [16:08] <Josh> exactly [16:08] <sarehu> but lim (x->pi/2) (tan(x)) does not exist [16:09] <sarehu> since on one side, it tends towards +infinity, …

Member Avatar for jbennet
0
565
Member Avatar for cessna172

I don't know what is your question. However, I found you have a small mistake in line 27. [code] ptrFileIn= fopen([COLOR="Red"][B]"data1"[/B][/COLOR],"r"); [/code] I think it suppose to be [code] ptrFileIn= fopen([COLOR="Green"][B]data1[/B][/COLOR],"r"); [/code]

Member Avatar for invisal
0
131
Member Avatar for devilofangel

Please make your code readable by using <code=cpp>your code</code>. Change from < to [ and > to ]

Member Avatar for Jishnu
0
142
Member Avatar for chaosatom333

You can using qsort() function which is come with <stdlib.h> header. Here the example of how to use this function: [code=cplusplus] #include <stdio.h> #include <stdlib.h> int CompareFunction(const void *p1, const void *p2) { if (*(const int*)p1 > *(const int*)p2) return 1; else return -1; return 0; } int main() { …

Member Avatar for iamthwee
0
283
Member Avatar for volia

I don't really understand. Here it is what I am understand so far: + First, we need to generate 4 random letters word. + Player can only guess one letter for 8 times. For example: (computer generate this letter [b]hstd[/b]) Guess this word **** Input your letter: [COLOR="Red"]o[/COLOR] There is …

Member Avatar for WaltP
0
137
Member Avatar for ellas747

[code] for( int i=0; i< [COLOR="Red"][b]14[/b][/COLOR]; i++) { p[i]= (200+.09*sales[i]); } [COLOR="Red"][b]printf("%7d%13d ", i, sales[i]);[/b][/COLOR] [/code] 1) You have 20 data of salaries. However you only loop 14 times. 2) I think you mistakenly [B]printf[/B] outside your loop. [code] [B][COLOR="Red"]int range[SIZE]={0};[/COLOR][/B] [/code] 3) You seem to declare a variable that …

Member Avatar for invisal
-1
119
Member Avatar for SpiderKing

[code] [COLOR="Red"]int *pointer [10];[/COLOR] struct cell{ int death; }; int test() {cout << pointer[0] -> death;} int main () { cell test; [COLOR="Red"]cell * pointer[0];[/COLOR] pointer[0] = &test; pointer[0] -> death = 5; test() cin.get(); return 0; } [/code] You've declared [B]pointer[/B] twice.

Member Avatar for SpiderKing
0
79
Member Avatar for cmoodc

I haven't played around with OpenGL for long time, but I know the place what I think it is able to help you [url]http://nehe.gamedev.net/[/url]

Member Avatar for invisal
0
94
Member Avatar for invisal

[code=cplusplus] int i ; n = 20 ; for ( i = 0 ; i < n ; i--) printf('x'); [/code] Find 3 ways to make this code print [b]x[/b] 20 times by ONLY CHANGE ONE CHARACTER in this code. Have fun guy!

Member Avatar for Duoas
0
136
Member Avatar for kaly12

[code=cplusplus] int main() { // code here } [/code] [B]int main()[/B] is standard while [B]void main()[/B] is not standard. It is good habit to use int [B]main() [/B]instead of [B]void main()[/B].

Member Avatar for invisal
0
92
Member Avatar for finalheavenx

If I were you, I would shorten to this: [code] #include <iostream> int main() { for(int i=1; i<=5; i++) { for(int j=i; j<=5; j++) std::cout << j << ' '; std::cout << std::endl; } return 0; } [/code]

Member Avatar for WaltP
0
125
Member Avatar for blud
Member Avatar for dr4g

In my opinion, you should create $_SESSION['attempt'] and make it expire every 5 minutes. Everytimes user fail to login, $_SESSION[attempt] will increase by 1 if user attempt more than 5 times then disable login page. This is what I think it should be.

Member Avatar for digital-ether
0
522
Member Avatar for invisal

How can I know if my website is in top1000 in google with one speciafic keywork. For example: "computer"....

Member Avatar for guinanie
0
139
Member Avatar for invisal
Member Avatar for bubai

Last night, I encounter this script maybe it is what you want. [url]http://www.pscode.com/vb/scripts/ShowCode.asp?txtCodeId=606&lngWId=8[/url]

Member Avatar for invisal
0
75
Member Avatar for invisal

How can I use variable from the outside of the class? For example: [code] <?php $outside = 'Hello'; class A { function printme() { print $outside; } } $cls = new A(); $cls->printme(); ?> [/code] How can I do it? please :D

Member Avatar for dr4g
0
106
Member Avatar for invisal

It is my first time in here and also my first question. I hate to admit it that I got stuck now. I got the Apache set up on my new computer and also the PHP5. After that, I modified the Apache2 httpd.conf file. [i]I added this into my configure …

Member Avatar for Rhyan
0
431
Member Avatar for Suriv

you can use Shell Function [i]Syntax : Shell(PathName, [WindowStyle])[/i] example : [code] Private Sub Form_Load() Shell ("notepad") End Sub [/code]

Member Avatar for wen_dell8
0
153
Member Avatar for JANINE

Linkin Park Papa Roach Limp Bizkit Green Day ("Boulevard Of Broken Dreams") Oasis Gorillaz SR-71 ("Tomorrow") P.O.D

Member Avatar for BeastOverlordH6
1
844
Member Avatar for invisal

It may offer a functional distribution of Linux, but the Linux kit for PlayStation 2 is also very much about making PlayStation 2 hardware accessible for learning how to develop games, and in the past year that the Linux kit has been available, we are pleased to say that several …

Member Avatar for John A
0
241
Member Avatar for invisal
Member Avatar for Dani
0
148

The End.