Search Results

Showing results 1 to 40 of 228
Search took 0.02 seconds.
Search: Posts Made By: stilllearning ; Forum: C++ and child forums
Forum: C++ Jun 21st, 2009
Replies: 4
Views: 618
Posted By stilllearning
In your linker settings have you typed in the complete path to where fltk.lib is located ? By default it'll look for it in the current project directory. If fltk.lib is something you are supposed to...
Forum: C++ Jun 3rd, 2009
Replies: 5
Views: 306
Posted By stilllearning
What errors do you get from the compiler ?
Forum: C++ Oct 30th, 2008
Replies: 8
Views: 936
Posted By stilllearning
You could just have a pointer called "start" and when "current == start" you can set the input as you need.
Forum: C++ Oct 29th, 2008
Replies: 8
Views: 936
Posted By stilllearning
I don't think just L and R will cut it.

Lets say your maze is a rectangle that has n number of points, and there are walls inside it that construct a number of paths. Now the user needs to take...
Forum: C++ Oct 24th, 2008
Replies: 4
Views: 526
Posted By stilllearning
Are you positive you have the shared library wld.so in your
/home/vincenzo/software/borealis-projects/LoadDistributionTool ?

And what is this supposed to be ? ${BOREALIS}/nmstl/bin/wtf ? its...
Forum: C++ Oct 24th, 2008
Replies: 5
Views: 603
Posted By stilllearning
I think what is happening is this


Tblk A;
Tblk B = A;


This is using a default copy constructor since you haven't defined one, and both your objects A and B are pointing to the same set...
Forum: C++ Oct 23rd, 2008
Replies: 7
Views: 607
Posted By stilllearning
Here is a decent example Link (http://marknelson.us/1996/01/01/priority-queues/)
Forum: C++ Oct 22nd, 2008
Replies: 7
Views: 607
Posted By stilllearning
Your priority_queue should be building a max_heap with the highest value at the top. Have you tried printing the contents of your queue after you finish building it, to see if the elements are in...
Forum: C++ Oct 22nd, 2008
Replies: 4
Views: 741
Posted By stilllearning
Here is a tutorial on bucket or bin sort. Link (http://en.wikipedia.org/wiki/Bucket_sort)

Each array of yours will be a bucket. You can create as many arrays as the buckets you'll need. Then sort...
Forum: C++ Oct 22nd, 2008
Replies: 6
Views: 1,558
Posted By stilllearning
strange. it works for me. here is my output.


Enter a sentence:
I have 200 apples
Number of vowels: 5
Number of digits: 3

s
e
Forum: C++ Oct 22nd, 2008
Replies: 7
Views: 607
Posted By stilllearning
When you insert your elements into the queue, you have to insert them so that the timestamps are sorted in descending order. That way when you dequeue your first element, you should get the correct...
Forum: C++ Oct 22nd, 2008
Replies: 6
Views: 1,558
Posted By stilllearning
Well .. I have no idea why your teacher would say that, but its really bad practice.

Now onto your code. Surprised it didn't crash. Your store_char() function does not have i initialized, and...
Forum: C++ Oct 22nd, 2008
Replies: 6
Views: 1,558
Posted By stilllearning
First of all, its good practice is to put your class declarations in a header or a .h file, put your definitions in a .cpp file and then include the .h file, where needed.

You really should not...
Forum: C++ Oct 22nd, 2008
Replies: 7
Views: 607
Posted By stilllearning
I am a little confused by your queue implementation. Usually your queue functions would be enqueue to add the elements to the queue, and dequeue to get the first element you added off the queue,...
Forum: C++ Oct 22nd, 2008
Replies: 12
Views: 962
Posted By stilllearning
Very interesting :). I had no idea about this. Thanks Salem.
Forum: C++ Oct 21st, 2008
Replies: 2
Views: 1,222
Posted By stilllearning
Well your variables below are local to the function. So when you leave the function, they don't exist and so their addresses now probably point to garbage values.

You should copy the values over...
Forum: C++ Oct 21st, 2008
Replies: 12
Views: 962
Posted By stilllearning
Also in addition to the braces, your logic is messed up. See the comments in your code.


for ( int i = 2 ; i < num; i++ )
/* you can add a special case for 2, you only need to check for...
Forum: C++ Oct 21st, 2008
Replies: 8
Views: 538
Posted By stilllearning
Its not deleting 3 numbers. Your for loop prints the numbers starting at index i instead of 0, so you "think" they are deleted.

You might want to delete the number and then call your print...
Forum: C++ Oct 21st, 2008
Replies: 12
Views: 962
Posted By stilllearning
I am curious ..

how did you get this to compile ?

if ( ( i == 2 ) or ( i % 2 != 0 ) )

There is no keyword called "or" in C++ its denoted by "||"
Forum: C++ Oct 21st, 2008
Replies: 8
Views: 538
Posted By stilllearning
are you sure it doesn't work ? it removes it correctly when I try using your code.
Forum: C++ Oct 21st, 2008
Replies: 8
Views: 538
Posted By stilllearning
You aren't assigning the variable index a value before calling the functions removeAt and insertAt. So you need to fix that first.

Well I just noticed that you are asking for the index in your...
Forum: C++ Oct 19th, 2008
Replies: 16
Views: 1,229
Posted By stilllearning
Looks good ! I have one suggestion.

Instead of having a standard array "steps" you could write a BaseGenReverse, similar to your teacher's BaseGen function and use that instead. So if the size...
Forum: C++ Oct 18th, 2008
Replies: 15
Views: 1,409
Posted By stilllearning
I'd suggest putting some print statements inside your scanipport function and that will help you pinpoint the line which is causing the error. Use thread_id() to print the thread#, so you can see...
Forum: C++ Oct 18th, 2008
Replies: 15
Views: 1,409
Posted By stilllearning
Your gdb error says that your program is crashing inside a memcpy somewhere. Now I don't see any other memcpy's in the code you posted, but you might want to switch to a single threaded run, and then...
Forum: C++ Oct 18th, 2008
Replies: 25
Views: 1,891
Posted By stilllearning
Well I am not sure how things would work, if you had parts of it pre-approved by professionals. From what I know, and what I've seen my classmates do, pretty much all of their theses had to be read,...
Forum: C++ Oct 18th, 2008
Replies: 2
Views: 554
Posted By stilllearning
lol .. contrary to popular belief, we are not clairvoyant, so you need to elaborate on what you are doing , what your problem is and post some code you've worked on !!
Forum: C++ Oct 18th, 2008
Replies: 4
Views: 1,156
Posted By stilllearning
comparsions are case sensitive, so you will need to use either toupper or tolower to make them the same.

I am not sure what you mean by not allowing the punctuation. But what the function strtok...
Forum: C++ Oct 18th, 2008
Replies: 5
Views: 4,328
Posted By stilllearning
Here is a link that mentions how the fstream getline works Link (http://www.cplusplus.com/reference/iostream/istream/getline.html)

What you need to do is

SortedBinary.getline(myBuffer,...
Forum: C++ Oct 18th, 2008
Replies: 16
Views: 1,229
Posted By stilllearning
You don't need to make your program distinguish between a decimal and a binary input. All you need to do is prompt a user for a decimal number and then send it to your routine.

A couple of things,...
Forum: C++ Oct 18th, 2008
Replies: 15
Views: 1,409
Posted By stilllearning
Again, there is only one memcpy() in your code, so I'll go with that

memcpy(&servaddr.sin_addr, hostaddr->h_addr, hostaddr->h_length);

your hostaddr is a pointer to the struct, which you...
Forum: C++ Oct 18th, 2008
Replies: 16
Views: 1,229
Posted By stilllearning
Here is an article that elaborates on how you can convert a decimal number to a binary.

Link (http://www.wikihow.com/Convert-from-Decimal-to-Binary)
Forum: C++ Oct 18th, 2008
Replies: 15
Views: 1,409
Posted By stilllearning
Well I see in your main() function

scout *p;

and then


p[s].ips = bohica;
p[s].startport = start;
p[s].endport = end;
Forum: C++ Oct 18th, 2008
Replies: 16
Views: 1,229
Posted By stilllearning
Sigh !!

All you need to do is write a function using the prototype
string DtoB (int Decimal)

that takes a decimal number <= 255 as the input, converts it to its binary form, stores the...
Forum: C++ Oct 18th, 2008
Replies: 8
Solved: Help......
Views: 503
Posted By stilllearning
Add Code Tags Please !!!

And there is no #include<iostream.h>

its #include<iostream>
Forum: C++ Oct 18th, 2008
Replies: 12
Views: 1,304
Posted By stilllearning
One thing, which may or may not be a problem, is this


if (validAccount == false) {
.....
switch(AccountType) {
case 's':
case 'S':
....
validAccount = true;
Forum: C++ Oct 18th, 2008
Replies: 25
Views: 1,891
Posted By stilllearning
I never wrote a thesis for my Masters, did more of a set of research papers, but honestly I haven't come across any that are more than a few hundred pages.

On a practical side, you do understand...
Forum: C++ Oct 18th, 2008
Replies: 6
Views: 731
Posted By stilllearning
At first glance, your traverse function is declared as a void, yet you are doing

result = tree.traverse(INFIX, printData(data));

This is not valid. I don't know what result is, but if its a...
Forum: C++ Oct 18th, 2008
Replies: 16
Views: 1,229
Posted By stilllearning
You need to make an effort to write something .. you cannot honestly expect someone to solve your midterm exam for you.
Forum: C++ Oct 17th, 2008
Replies: 9
Views: 511
Posted By stilllearning
not ... exaaactly !!

bool is a datatype .. so you cannot do bool == smthing

I don't know what you're trying to do, but here are some modifications.


bool test;
string input;
Forum: C++ Oct 17th, 2008
Replies: 5
Views: 682
Posted By stilllearning
um .. could it be a spelling mistake on your part ?

its __declspec( dllimport )

not __declspec( dllimort )
Showing results 1 to 40 of 228

 


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

©2003 - 2009 DaniWeb® LLC