Search Results

Showing results 1 to 36 of 36
Search took 0.01 seconds.
Search: Posts Made By: freudian_slip
Forum: C++ Nov 12th, 2008
Replies: 12
Views: 1,459
Posted By freudian_slip
What are those errors that you are getting? And what is it that you are trying to move to main, cout?
Forum: C++ Nov 12th, 2008
Replies: 7
Views: 429
Posted By freudian_slip
What is it that you are having problem with? Are you getting errors when you compile? Does it compile but doesn't display the correct values??
Forum: C++ Nov 12th, 2008
Replies: 12
Views: 1,459
Posted By freudian_slip
Forum: Java Nov 7th, 2008
Replies: 1
Views: 293
Posted By freudian_slip
Hey all, I use Windows XP and atm, I need to increase the memory allocated from default 64M(i think?) to 500M.

So I'm in the directory where the jar file is (I'm using JFLAP if anybody is familiar...
Forum: C++ Nov 5th, 2008
Replies: 2
Views: 783
Posted By freudian_slip
There's nothing about validating in your book because it's not standard, it's something that you make it yourself.


mm that's all i can **** to write down atm..... let me know if you need more...
Forum: C++ Nov 5th, 2008
Replies: 5
Views: 382
Posted By freudian_slip
Do you get any errors? Because syntax wise, it looks okay to me..
Forum: C++ Nov 5th, 2008
Replies: 3
Views: 630
Posted By freudian_slip
You see, you declared num. Now num points to a 4byte block which contains a garbage information. So when you are calling mysterlen, you are giving whatever happened to be stored in that block of...
Forum: C++ Nov 4th, 2008
Replies: 6
Views: 3,014
Posted By freudian_slip
Why would you need to use a char array? using int array should be fine.

reverse (num)
array[count] = num
count ++
get a new num
reverse (num)
print out array[count]
count--
Forum: C++ Nov 4th, 2008
Replies: 5
Views: 393
Posted By freudian_slip
Someone correct me if I'm wrong please.

As of array, when you first declare array, you are allocating a block of memory and what you get is a pointer( address of a memory) that indicates where...
Forum: C++ Nov 3rd, 2008
Replies: 8
Views: 855
Posted By freudian_slip
If you are having problem with rand() go google 'rand cpp reference'. It has a nice example as to how to use it.

And like the above poster has mentioned,

>>while (x % answer != 0) answer++;
...
Forum: C++ Nov 3rd, 2008
Replies: 4
Views: 370
Posted By freudian_slip
I think it is because C is just more flexible when it comes to handling memory.. hence giving your more control over it.


[edit] Another thing I can think of is that char is one byte while int is...
Forum: C++ Nov 3rd, 2008
Replies: 4
Views: 370
Posted By freudian_slip
Didn't you post the same topic before? The answer is like two pages behind. h is char but g is int. they are not of the same type.
Forum: C++ Nov 3rd, 2008
Replies: 6
Views: 674
Posted By freudian_slip
No I don't think that's what her teacher meant. By doing what you did there, you are "hardcoding" this. That is not a good practice. Suppose he wanted to change the char array from "This is a test"...
Forum: C++ Nov 3rd, 2008
Replies: 9
Views: 513
Posted By freudian_slip
If you are really determined to learn it on your own, start with little projects. In fact, if you go to one of the stickied threads above, there are a bunch of problems for beginners that you can try...
Forum: C++ Nov 3rd, 2008
Replies: 10
Views: 843
Posted By freudian_slip
Well, I'm a noob myself. Just read the code. Good amount of standard built in functions are very readable. For instance, when you see letters.begin() or letters.end() you know what that means. I've...
Forum: C++ Nov 3rd, 2008
Replies: 10
Views: 843
Posted By freudian_slip
Well, the code above isn't correct. That takes all alphabets, regardless whether it is a capital letter or a small letter, push it into a vector, sort and prints them out. (vector is like array but...
Forum: Geeks' Lounge Nov 3rd, 2008
Replies: 1,549
Views: 200,818
Posted By freudian_slip
Mark Twain

There are three kinds of lies: lies, damn lies and statistics.
Forum: Community Introductions Nov 3rd, 2008
Replies: 2
Views: 320
Posted By freudian_slip
Sorry, I lied!!!


I usually don't post in "hello i'm a noob at this site" but i just wanted to make a topic that (wrongfully) claimed that i'm not a geek.

I'm from US. Btw, Freud is a fraud!!...
Forum: Geeks' Lounge Nov 3rd, 2008
Replies: 9
Views: 1,195
Posted By freudian_slip
it looks good... but it lacks a fridge full of food :/
Forum: C++ Nov 3rd, 2008
Replies: 14
Views: 829
Posted By freudian_slip
Do check the syntax. When the compiler throws an error, DO READ THE ERROR. Error really tells you what exactly is wrong with your code.

if ((wheelNumber = 0) && (bet = 0))
{
cout<< "You win!...
Forum: C++ Nov 2nd, 2008
Replies: 2
Views: 271
Posted By freudian_slip
/high fives mrboolf

sorry for non constructive post but people aren't here to do your hw. They are here to help and guide and point out flaws.
Forum: C++ Nov 2nd, 2008
Replies: 3
Views: 430
Posted By freudian_slip
When you are passing row and col to get Data, you are derefenrencing it. But they are of type int. And what does " >> " operator do? I've never seen it used out side of cin >> .


[edit] er nvm i...
Forum: C++ Nov 2nd, 2008
Replies: 14
Views: 829
Posted By freudian_slip
Well, your syntax errors can be easily figured out from the errors. So do read the errors carefully, go back to your code, think about it a bit more, google the error message and if you still can't...
Forum: C++ Nov 2nd, 2008
Replies: 10
Views: 843
Posted By freudian_slip
Because when you are comparing

if ( text[i]>=65 && text[i]<=90 )
{
lol[j]=text[i];
j++;
}


what you are doing is you are comparing the content of the array which is not an int....
Forum: C++ Nov 2nd, 2008
Replies: 6
Views: 762
Posted By freudian_slip
Go look up reference manual or something. http://www.cplusplus.com/reference/clibrary/cstdlib/srand.html

Can you actually compile the code? Because I see that underneath

srand((unsigned int)...
Forum: C++ Nov 2nd, 2008
Replies: 3
Views: 345
Posted By freudian_slip
I'd have to say the contents. To check if they refer to same memory locations, you will have to dereference when you compare.
Forum: C++ Nov 2nd, 2008
Replies: 6
Views: 762
Posted By freudian_slip
Well, upon searching google....

http://www.cprogramming.com/tutorial/random.html

I think it shows good examples of using random number generator using seed and stuffs.
Forum: C++ Nov 2nd, 2008
Replies: 14
Views: 829
Posted By freudian_slip
Well, I'm a noob myself so not really sure if I'm helping you or not but I guess I'll give it a shot.

First of all, you did declare typeOfBet and allocated memory for it but what's inside of that...
Forum: C++ Nov 2nd, 2008
Replies: 10
Views: 843
Posted By freudian_slip
Er, I'm not really sure what you are trying to do with your do loop.

But here's how I would go about it. If I had time, I'd write the actual code but I'm just procrastinating for another...
Forum: C++ Nov 2nd, 2008
Replies: 3
Solved: sqrt function
Views: 1,018
Posted By freudian_slip
I'm using gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)

Thanks for the tip, I did try casting double but I guess I typecasted double(2/num) instead of double(2)/num. Thanks...
Forum: C++ Nov 1st, 2008
Replies: 3
Solved: sqrt function
Views: 1,018
Posted By freudian_slip
For some weird odd reason, sqrt(2/num) does not work.

cout << " sqrt(2): " << sqrt(2) << endl;
cout << " sqrt(num): " << sqrt(num) << endl;
cout << " sqrt(2)/sqrt(num): " <<...
Forum: C++ Nov 1st, 2008
Replies: 4
Views: 333
Posted By freudian_slip
Well, since the description of the readSeq funcion doesn't actually describe what it is returning, maybe it should be void readSeq, rather than int. And as of passing parameters, why do you need to...
Forum: C++ Oct 31st, 2008
Replies: 5
Views: 2,978
Posted By freudian_slip
Actually, I answered my own question. Found out that I was using gcc in the makefile rather than g++.g++ includes gcc and more.
Forum: C++ Oct 31st, 2008
Replies: 5
Views: 2,978
Posted By freudian_slip
Thanks, Prabakar.

On a somewhat related note, I also have linking problems. Such as
test.cpp:(.text+0x206): undefined reference to `std::cout'
test.cpp:(.text+0x20b): undefined reference to...
Forum: C++ Oct 31st, 2008
Replies: 24
Views: 61,667
Posted By freudian_slip
As of top coder, there is a "practice" room where there are thousands and thousands or maybe just hundreds of problems you can solve. and they are also divided into sections for beginners,...
Forum: C++ Oct 31st, 2008
Replies: 5
Views: 2,978
Posted By freudian_slip
Hi, I'm doing a very very simple coding, However the compiler apparently does not like my usage of cin and gives me an error: no match for 'operator<<' or 'operator>>' depending on cout or cin.
...
Showing results 1 to 36 of 36

 


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

©2003 - 2009 DaniWeb® LLC