Search Results

Showing results 1 to 23 of 23
Search took 0.05 seconds.
Search: Posts Made By: iamboredguy
Forum: C Apr 12th, 2006
Replies: 2
Views: 925
Posted By iamboredguy
I know that part. I did that. but it apparently does not work.
Forum: C Apr 12th, 2006
Replies: 2
Views: 925
Posted By iamboredguy
I have a code in which I want to swap an element in a matrix with another. User inputs the row, column no of the elements to be swapped. But the code doesn't seem to work. Can somebody help?
PS: The...
Forum: C Apr 7th, 2006
Replies: 6
Views: 2,968
Posted By iamboredguy
that works. thanks a lot!
Forum: C Apr 7th, 2006
Replies: 6
Views: 2,968
Posted By iamboredguy
nice idea. but how do I randomly shuffle a row? taking rowpos[]={0,1,2,3} how do I shuffle? using rand() won't work since I would have the same problem as before.
Forum: C Apr 7th, 2006
Replies: 6
Views: 2,968
Posted By iamboredguy
I know about the size of the array. I just put 10 so that the program doesnt eat up too much memory during testing. I'm pretty sure I decremented the value of n as well. something else is wrong.
Forum: C Apr 6th, 2006
Replies: 6
Views: 2,968
Posted By iamboredguy
for my project, I need to generate an n*n matrix (n is user input) with numbers from 1 to x (x<n) positioned randomly. I tried implementing it with this code but it doesnt seem to work. x = n*n -...
Forum: C Mar 18th, 2006
Replies: 1
Views: 1,646
Posted By iamboredguy
we have a project in our class to design a sliding numbers game similar to this one:
http://www.eatmygames.com/gameinfo.asp?id=24puzzle
the only difference is that the number of blank spaces is...
Forum: C++ Jan 22nd, 2005
Replies: 47
Views: 154,726
Posted By iamboredguy
Hey firenet
You had mentioned a way to delete a record from the file (using sequential access). I tried to do it with random access (i.e seekg and seekp). The program can't delete the last record....
Forum: Viruses, Spyware and other Nasties Oct 1st, 2004
Replies: 2
Views: 1,601
Posted By iamboredguy
I have a popup program that seems to have installed itself on my computer. Everytime my internet is idle, it displays search results from some searchmiracle.com. I don't know how it got onto my PC...
Forum: C++ Sep 8th, 2004
Replies: 1
Views: 3,003
Posted By iamboredguy
Since no one cared to answer my thread posted earlier, :mad: I'm posting the question again.
I have this project to do and I want to use coloured text and some simple shapes, etc. But the problem...
Forum: C++ Sep 7th, 2004
Replies: 5
Views: 2,571
Posted By iamboredguy
You don't HAVE to define NUM_TURNS as static. Defining it as static makes it common between all objects of that class. So if you have
GamePlayer a1;
GamePlayer a2;
then, a1.NUM_TURNS and...
Forum: C++ Sep 7th, 2004
Replies: 6
Views: 3,648
Posted By iamboredguy
No wait. You are trying to compare individual letters with strings when you use
words[i]. strcmp() can only accept string arguments.
Forum: C++ Sep 7th, 2004
Replies: 6
Views: 3,648
Posted By iamboredguy
Did you include string.h?
Forum: C Sep 5th, 2004
Replies: 9
Views: 8,132
Posted By iamboredguy
The remainder gives you the individual digit. After the remainder is taken, the no. is divided by 10. Since in int no decimal pts are allowed, the original no. has one digit less.
Then the remainder...
Forum: C++ Sep 4th, 2004
Replies: 19
Views: 8,509
Posted By iamboredguy
No comparison! I'm doing both subjects right now. And calculus drives me nuts! I mean its pretty awe-inspiring but it never gets into my head. C++ is a different matter. I thoroughly enjoyed every...
Forum: C++ Sep 4th, 2004
Replies: 4
Views: 8,841
Posted By iamboredguy
I have this project to do and I want to use coloured text and some simple shapes, etc. But the problem is that my compiler does not support graphics.h or dos.h. Even my tclite doesn't (I usually use...
Forum: C Sep 4th, 2004
Replies: 9
Views: 8,132
Posted By iamboredguy
You do have to use arrays in the method I know, but int arrays, not strings, which I think are easier to manipulate.

#include <iostream.h>
#include <conio.h>

int main()
{
int a[5]={0,0};...
Forum: C Sep 4th, 2004
Replies: 12
Views: 3,289
Posted By iamboredguy
Shalin's method is the ideal one. However, if you don't want to use strcmp() for some reason, there's always a manual, lenghtier way to do it:

#include <iostream.h>
#include <stdio.h>

int...
Forum: C++ Sep 2nd, 2004
Replies: 8
Views: 3,788
Posted By iamboredguy
I don't get why C++ pros see red when they see void main(). Can someone explain why intmain() is good and void main() bad?
Forum: C++ Sep 2nd, 2004
Replies: 2
Views: 8,408
Posted By iamboredguy
Well, you can try this code, but I don't know if it will work beyond n=9.

#include <iostream.h>
#include <conio.h>

/* This program creates a half pyramid of nos. Created on 12.6.2k3. */
...
Forum: C++ Sep 2nd, 2004
Replies: 3
Views: 5,772
Posted By iamboredguy
Chainsaw's code is correct except for one thing, you add j to the sum, not i;

#include <iostream.h>
#include <conio.h>

void main()
{
int n;
cin>>n;
int i, j;
Forum: C++ Sep 1st, 2004
Replies: 2
Views: 11,147
Posted By iamboredguy
I didn't know I had to close all variables connected to the file to be deleted. It worked after I did that. Thanks a ton Dave. :)
Forum: C++ Aug 31st, 2004
Replies: 2
Views: 11,147
Posted By iamboredguy
I'm trying to use sequential binary file editing in C++. I use a temporary file. I have to make the changes in the file by storing the modified data in the temp file. Then I delete the original file...
Showing results 1 to 23 of 23

 


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

©2003 - 2009 DaniWeb® LLC