Search Results

Search: Posts Made By: sepoto
Forum: Programming 03-31-2011
3,587
Posted By sepoto
I think so yes. Thanks for your reply. Does C++...
I think so yes. Thanks for your reply. Does C++ have any built in classes to handle binary trees or do I have to do all the plumbing myself?
Forum: Programming 03-31-2011
3,587
Posted By sepoto
Binary Tree
I have just been researching this topic and I was wondering what type of application might a binary tree be used for. For instance what type of application would be a good showcase for a binary tree...
Forum: Programming 02-14-2011
3,853
Posted By sepoto
This is the extent of what I have put together at...
This is the extent of what I have put together at the moment. It needs work but it should give you a good idea of what I'm aiming for. Thanks for your interest in this.



#include <iostream>...
Forum: Programming 02-13-2011
3,853
Posted By sepoto
If one were to compile the example and run it in...
If one were to compile the example and run it in a debugger like the Eclipse IDE that I use on Fedora you will see the 'for' loop in question only runs one time all the time. Clearly that is not the...
Forum: Programming 02-13-2011
3,853
Posted By sepoto
C++ bubble sort.
In regards to the for loop with '&& flag' I think I see the intended logic. If there was a transaction keep looping until the end of the array otherwise exit. Well it compiles but it does not work as...
Forum: Programming 01-30-2011
2,212
Posted By sepoto
Multidimensional arrays and sort.
My language is C++. I have a multidimensional vector that I would like to sort by a specific "cell" or "field" within the main vector. Does anyone have any information on how to do this? I have...
Forum: Programming 01-29-2011
2,470
Posted By sepoto
Solution.
The language is C++ and the solution is this: I copy pasted directly in to my code and it worked great.

struct myLessThan : public binary_function< string, string, bool > { bool operator()(...
Forum: Programming 01-29-2011
2,470
Posted By sepoto
Sorting a vector of strings into numerical order.
I have a vector of strings that contain a list of channels like this:

101,99,22HD,432,300HD

I have tried using the sort routine like this:

sort(mychans.begin(),mychans.end());

For some...
Forum: Programming 01-07-2011
1,737
Posted By sepoto
Thanks a lot! I was wondering what a good...
Thanks a lot! I was wondering what a good implementation of leap year would be. You code is a huge help! :b:
Forum: Programming 01-05-2011
1,368
Posted By sepoto
Sorting a multidimensional vector by a specific field.
In some cases I would like to sort by index, in some cases by color and in some cases by Callsign. Can this be done? :D


vector< vector<string> > table;
vector<string> row;
...
Forum: Programming 01-04-2011
1,737
Posted By sepoto
Reply to integer date program.
The reason for me using that style of date is because that is what exists in my database. For the time being I wrote some code which I will post below. I wouldn't mind converting to a Julian style...
Forum: Programming 01-03-2011
1,737
Posted By sepoto
C++, g++ compiler for Linux.
C++, g++ compiler for Linux.
Forum: Programming 01-03-2011
1,737
Posted By sepoto
'int air_date' '%'?
int air_date='20100103'; //2010 - Jan - 03

/* My goal here is to subtract a day. */

int day = air_date % 100; //?????? Is this right?

//Are there any functions time/date for this type of...
Forum: Programming 01-03-2011
1,325
Posted By sepoto
Quick question about '_&'
I've seen in other programmers code the use of '_&' as a line separator. I am trying to find in my C++ reference manual some pages dedicated to an explanation of the use of this '_&' but I don't know...
Forum: Programming 12-31-2010
1,103
Posted By sepoto
I need to scan my 'vector<string> mystrings' for duplicate entries.
Basically I'm trying to avoid writing paragraphs to do it. It is possible I could convert over to a vector<int>'s if that may help. Does anyone know how to do this without really turning it into a...
Forum: Programming 12-29-2010
2,338
Posted By sepoto
Multidimensional Array
vector<vector<string>> big;
vector<strings> small;

small.push_back("Cell One");
small.push_back("Cell Two");
small.push_back("Cell Three");

big.push_back(small);

cout << big[0][0] <<...
Forum: Programming 12-29-2010
2,338
Posted By sepoto
Thanks for your reply. Your welcome to all of it....
Thanks for your reply. Your welcome to all of it. Since I posted I tried changing to string tl[10000][3] which seems to work nicer but still ends in a fatality at run time.



#include...
Forum: Programming 12-29-2010
2,338
Posted By sepoto
Multidimensional array of strings with vector.
I've been struggling with this for quite some time. I decided I should get some help with this. Nothing is working. I'm getting a segmentation fault or out of bounds error when I try to load the...
Forum: Programming 12-21-2010
1,017
Posted By sepoto
find() doesn't find '|' for some reason
Here's some sample output and my code follows it. Why can't find() find '|'. It just dosn't make a bit of sense at all.

AL01463|Pell City|Saint Clair|B|02115|AL|35125|630|Birmingham (Ann and ...
Forum: Programming 12-21-2010
2,759
Posted By sepoto
Thank you so much! Thanks to your post I figured...
Thank you so much! Thanks to your post I figured out I need to be using a vector. You guys are it!
Forum: Programming 12-20-2010
2,759
Posted By sepoto
segmentation fault.
This code is causing a segmentation fault and I can't figure out why. I'm new to UNIX and I need to learn how to avoid this segmentation fault thing. Thank you so much. Thanks also for the great...
Forum: Programming 12-20-2010
2,789
Posted By sepoto
getline()
I can not get 'getline()' to compile. I have tried.

string curLine; //= compiler error
char* curLine; //=compiler error
char[] curLine; //=compiler error

Every example I see uses a string as...
Forum: Programming 12-20-2010
1,612
Posted By sepoto
Pointer for class not working that well. Syntax I think.
I'll be gratefull for any help. Thanks.
:)
This is the non class type error:
[root@dsgfedora01 dsgsports]# g++ -I/usr/include/mysql -I/usr/include/mysql++ -lmysqlpp -L/usr/lib/mysql...
Forum: Programming 12-19-2010
2,375
Posted By sepoto
Segmentation fault.
I'm getting a segmentation fault. I'm new to Linux programming. Thanks so much for all of your input.:eek:

#include </usr/include/mysql++/mysql++.h>
#include <stdio.h>
#include <iostream>...
Showing results 1 to 24 of 24

 
All times are GMT -4. The time now is 06:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy