Search Results

Showing results 1 to 37 of 37
Search took 0.01 seconds.
Search: Posts Made By: manutd ; Forum: C++ and child forums
Forum: C++ Dec 27th, 2006
Replies: 3
Code Snippet: Convex Hull
Views: 3,141
Posted By manutd
And because this is C++, #defines should be made const. And he's using C style strings, not std::strings.
Forum: C++ Dec 15th, 2006
Replies: 3
Code Snippet: Convex Hull
Views: 3,141
Posted By manutd
#include <iostream.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
O-o-outdated. It's:
#include <iostream>
#include <cstdio>
#include <cstdarg>
#include <cstdlib>
Forum: C++ Dec 10th, 2006
Replies: 7
Views: 2,947
Posted By manutd
I'm sure there is an example either in the code snippets section or on Wikipedia.
Forum: C++ Dec 7th, 2006
Replies: 9
Views: 1,352
Posted By manutd
1) Use [code] tags.
2) void main (){ Nope, its int main(){
3) studentResultsStream.open(a:studentResults.txt"...Missing opening quote.
Forum: C++ Dec 7th, 2006
Replies: 9
Views: 1,352
Posted By manutd
Please show some effort. We will not do your homework for you. Post your attempt for us to correct.
Forum: C++ Dec 6th, 2006
Replies: 7
Views: 4,224
Posted By manutd
You created a new thread with the same question. Look there.
Forum: C++ Dec 6th, 2006
Replies: 7
Views: 4,224
Posted By manutd
1) number = get_number(); // subroutine will ask user for a numberNot if it's not defined it won't ;)
2) cin >> get_number
a. Where is get_number defined?
b. Missing semi-colon.
3) cout <<...
Forum: C++ Nov 29th, 2006
Replies: 0
Code Snippet: Rock Paper Scissors
Views: 5,253
Posted By manutd
This is a simple rock paper scissors game using random numbers.
Forum: C++ Nov 25th, 2006
Replies: 4
Views: 5,639
Posted By manutd
Use [code] tags!
Forum: C++ Nov 24th, 2006
Replies: 2
Views: 5,612
Posted By manutd
You may want to take out the non-standard functions and headers (getch(), etc).
Forum: C++ Nov 22nd, 2006
Replies: 7
Views: 1,283
Posted By manutd
The problem is he divides radius by n before n is initialized or inputed.
Forum: C++ Nov 21st, 2006
Replies: 7
Views: 1,283
Posted By manutd
First write out a timeline of how to do it on paper. Then take that timeline and translate it into code. (hint: this double width = radius / n; is in the wrong place).
Forum: C++ Nov 21st, 2006
Replies: 2
Code Snippet: Pythagorus
Views: 2,092
Posted By manutd
There are some outdated elements (goto), non-portable ones (system("PAUSE"), and a complete lack of indentation.
Forum: C++ Nov 21st, 2006
Replies: 5
Code Snippet: Bowling game
Views: 3,886
Posted By manutd
6) Take out the .h's:
include <iostream>
//etc...
Forum: C++ Nov 21st, 2006
Replies: 7
Views: 1,283
Posted By manutd
Also, your main function needs a closing brace:
int main()
{
int n;
double radius = 2;
double width = radius / n;

cout << "Enter the number of rectangles> ";
cin >> n;...
Forum: C++ Nov 20th, 2006
Replies: 2
Code Snippet: Negative Random Numbers
Views: 4,804
Posted By manutd
Main should have a type int main (void)
Forum: C++ Nov 20th, 2006
Replies: 5
Code Snippet: Bowling game
Views: 3,886
Posted By manutd
1)Main should have a type: int main (void)
2) O-o-out dated: goto begin;
3) What's with the indentation?
4) Seed rand only once, at the start of the app.
5) Could you have made this any less...
Forum: C++ Nov 20th, 2006
Replies: 1
Code Snippet: compinations
Views: 1,520
Posted By manutd
This void main()should be int main(void). Try to find alternatives to using clrscr, etc, as they are non-portable.
Forum: C++ Nov 20th, 2006
Replies: 4
Code Snippet: hanoi tower game
Views: 3,850
Posted By manutd
Is this C++ code? It looks like C code.
Forum: C++ Nov 20th, 2006
Replies: 4
Views: 1,560
Posted By manutd
Try this (http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1048382857&id=1043284392)page.
Forum: C++ Nov 20th, 2006
Replies: 1
Views: 1,334
Posted By manutd
1) Please indent your code.
2) What are the line numbers of the errors?
3)void main () should be int main (void)
Forum: C++ Nov 20th, 2006
Replies: 6
Views: 4,532
Posted By manutd
Welcome, my pleasure :)
Forum: C++ Nov 19th, 2006
Replies: 6
Views: 4,532
Posted By manutd
void main()Should be int main (void)
Forum: C++ Nov 18th, 2006
Replies: 6
Views: 4,532
Posted By manutd
How about you don't double post code snippets?
Forum: C++ Nov 18th, 2006
Replies: 11
Views: 4,093
Posted By manutd
Also, using namepace std is not always better than what the OP did. His way is fine.
Forum: C++ Nov 15th, 2006
Replies: 6
Views: 5,633
Posted By manutd
Also, please use [code] tags.
Forum: C++ Nov 15th, 2006
Replies: 8
Views: 1,580
Posted By manutd
Forum: C++ Nov 14th, 2006
Replies: 6
Views: 1,528
Posted By manutd
void main()Should beint main()
Forum: C++ Nov 13th, 2006
Replies: 2
Code Snippet: Find factors
Views: 4,829
Posted By manutd
It will compile and work, at least for me. [n] and [n-1] in that section produce the same output for me. I'm using wxDev-C++.
EDIT: In fact, this causes it to output n (1) twice, which is...
Forum: C++ Nov 12th, 2006
Replies: 6
Views: 1,770
Posted By manutd
Please don't post the same thank you three times :rolleyes:
Forum: C++ Nov 12th, 2006
Replies: 6
Views: 1,770
Posted By manutd
Did it work? I would assume it did, all you had to do was enter a number to cin :lol:
Forum: C++ Nov 12th, 2006
Replies: 6
Views: 1,770
Posted By manutd
Try entering a number and pressing enter.
Forum: C++ Nov 11th, 2006
Replies: 7
Views: 1,497
Posted By manutd
Have you tried searching google for binary search recursive? That should turn up many results, as Ancient Dragon said. For starters, try looking here...
Forum: C++ Nov 10th, 2006
Replies: 4
Views: 1,194
Posted By manutd
I can read English, not gibberish. If you want help, you must actually post in a reasonable fashion. Also, USE CODE TAGS! Can you not read the backround of the post screen?
Forum: C++ Nov 10th, 2006
Replies: 14
Views: 3,950
Posted By manutd
And as a final reason, it's no longer being updated. While Dev-C++ IDE isn't either, you can download MinGW patches for it.
Forum: C++ Nov 10th, 2006
Replies: 2
Code Snippet: Find factors
Views: 4,829
Posted By manutd
This is a function that will find the factors of a given number for you.
EDIT: Better algorithm using vectors (thanks all at cprog :) )
Forum: C++ Nov 10th, 2006
Replies: 14
Views: 3,950
Posted By manutd
Why use Turbo C? Try downloading Dev-C++, Code::Blocks, or if you're into the command line, gcc.
Showing results 1 to 37 of 37

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC