Search Results

Showing results 1 to 40 of 88
Search took 0.02 seconds.
Search: Posts Made By: iamthwee ; Forum: C++ and child forums
Forum: C++ Nov 2nd, 2009
Replies: 1
Views: 413
Posted By iamthwee
// strings and c-strings
#include <iostream>
#include <cstring>
#include <string>
#include <vector>

using namespace std;

vector<string> SplitString (string aString)
{
Forum: C++ Oct 8th, 2009
Replies: 3
Views: 206
Posted By iamthwee
Why would anyone download a zip file from a relatively unknown user which could contain ANYTHING?

Especially without any real description of what it might be or sample code snippets?

Nope.
Forum: C++ Oct 2nd, 2009
Replies: 7
Views: 361
Posted By iamthwee
For example....


#include <iostream>
#include <string>
#include <algorithm>
#include <vector>

using namespace std;
Forum: C++ Oct 2nd, 2009
Replies: 7
Views: 361
Posted By iamthwee
Yep, and thinking out aloud...

I assume you have to add the third parameter pos which will either be single, start-end or start-middle-end and no other case.

Therefore if you sort your file by...
Forum: C++ Oct 1st, 2009
Replies: 6
Views: 656
Posted By iamthwee
I think you want to sort your struct, not just an array?
Forum: C++ Oct 1st, 2009
Replies: 7
Views: 361
Posted By iamthwee
Hmm, I don't know why you're fixated on using a map.

Why not create your own object/class?



class Something
{
public:
char letter; //a
Forum: C++ Sep 30th, 2009
Replies: 23
Solved: Parsing in C++
Views: 682
Posted By iamthwee
Indeed.
Forum: C++ Jul 21st, 2009
Replies: 8
Views: 355
Posted By iamthwee
> BTW, iamthwee, you forgot a zero at the end of the number

yeah a typo, I still think you need the +1 which makes the answer
30.89, which rounds to 31?

For example in his example:

4th week...
Forum: C++ Jul 17th, 2009
Replies: 7
Views: 440
Posted By iamthwee
I think, and I say this cautiously because I'm not too sure, as your error log is quite ambiguous.

But is there a problem with the number of arguments you are passing?
Forum: C++ Jul 17th, 2009
Replies: 1
Views: 162
Posted By iamthwee
You have an idea.

Get a random number 1-3

If 1 then rock
if 2 then scissors
if 3 then paper

Yes?
Forum: C++ Jul 16th, 2009
Replies: 1
Views: 216
Posted By iamthwee
here (http://lmgtfy.com/?q=term+paper+topic+c%2B%2B)
Forum: C++ Jul 13th, 2009
Replies: 4
Views: 324
Posted By iamthwee
Or those of you that like using std:strings etc.


#include <algorithm>
#include <cctype>
#include <iostream>
#include <string>

int lowercase ( int c )
{
Forum: C++ Jun 30th, 2009
Replies: 10
Views: 446
Posted By iamthwee
Forum: C++ Jun 3rd, 2009
Replies: 4
Views: 256
Posted By iamthwee
Explain your question again?
Forum: C++ Jun 1st, 2009
Replies: 6
Views: 347
Posted By iamthwee
-iostream.h should be iostream
-it's int main
-you're mixing index with the variable i

etc etc and use tags next time.
Forum: C++ May 29th, 2009
Replies: 16
Views: 653
Posted By iamthwee
>As for the monkey statement, find me a video of a big furry monkey programming in c++ and successfully compiling and I'll get you a cookie the size of the big joyous grin I'll have for you.

I've...
Forum: C++ May 29th, 2009
Replies: 16
Views: 653
Posted By iamthwee
Nobody is gonna do that for you. Seriously?

However, here are a few things I have noted.

hello world in java
interface Printer
{
void print ( Message message );
}
Forum: C++ May 27th, 2009
Replies: 2
Views: 178
Posted By iamthwee
maybe rec[0] == rec[rec.length()-1]
Forum: C++ May 20th, 2009
Replies: 10
Views: 560
Posted By iamthwee
At the moment the way you're doing it, looks more like c than c++.

I would be tempted to read the file in line by line (getline), delimit it using space (istream), parse it to check whether the...
Forum: C++ May 1st, 2009
Replies: 1
Views: 263
Posted By iamthwee
graphics.h + dos.h = antiquated turbo c++

Not many people use le antiquated turbo c++ because, well it just sucks.

I would just download it and experiment with it.
Forum: C++ Apr 8th, 2009
Replies: 19
Views: 1,351
Posted By iamthwee
http://www.daniweb.com/code/snippet233.html, oops missed the purpose of calculating last non-zero digit which makes the algorithm simpler. :)
Forum: C++ Apr 5th, 2009
Replies: 14
Views: 1,058
Posted By iamthwee
>You could tokenize (strtok) by "<" and stick each piece into a vector or so... then get it's size().

Best not to mix c with c++. Naughty naughty :-0

In any case all these suggestions are too...
Forum: C++ Mar 23rd, 2009
Replies: 3
Views: 960
Posted By iamthwee
Indeed, but we're not a homework writing service.
Forum: C++ Mar 5th, 2009
Replies: 7
Views: 869
Posted By iamthwee
Try this:


#include <iostream>
#include <string>
#include <stack>

class Foo
{
public:
Forum: C++ Feb 4th, 2009
Replies: 2
Views: 599
Posted By iamthwee
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <sstream>

using namespace std;

int main()
{
Forum: C++ Jan 31st, 2009
Replies: 5
Views: 276
Posted By iamthwee
For humour I decided to compile and run it after a few mods:

test.cpp

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

using namespace std;
Forum: C++ Jan 16th, 2009
Replies: 8
Views: 1,084
Posted By iamthwee
> if that was the intention of the question, fine, but otherwise it is a very stupid question.

Maybe it was. (assuming you take midpoints of partial sums)...
Forum: C++ Dec 23rd, 2008
Replies: 15
Views: 1,064
Posted By iamthwee
#include "verySmallViolins.h"

Absolutely essential when handing in homework that is late.
Forum: C++ Nov 5th, 2008
Replies: 11
Views: 1,083
Posted By iamthwee
OK I've had enough of this nonsense, you're on your own now.

Ha ha ha.
Forum: C++ Sep 1st, 2008
Replies: 8
Views: 725
Posted By iamthwee
Yes I have no issue on windowsxp using dev-cpp, but with ubuntu (under a vmware environment) I do.

#include <iostream>
#include <string>

using namespace std;

int main()
{
string a =...
Forum: C++ Aug 29th, 2008
Replies: 8
Views: 656
Posted By iamthwee
Yes that is correct.
Forum: C++ Aug 27th, 2008
Replies: 2
Views: 1,063
Posted By iamthwee
Doesn't isdigit expect a char?
Forum: C++ Aug 21st, 2008
Replies: 11
Views: 708
Posted By iamthwee
Please find program below:


#include <iostream>
#include <string>

using namespace std;

#define FOR_LOOPS cout << "* * * * *\n_ * * * *\n_ _ * * *\n_ _ _ * *\n_ _ _ _ *";
Forum: C++ Aug 21st, 2008
Replies: 7
Views: 885
Posted By iamthwee
For your information:
http://www.cprogramming.com/tutorial/stl/iterators.html
Forum: C++ Aug 12th, 2008
Replies: 9
Views: 604
Posted By iamthwee
>what should i do now?
Debug it.
Forum: C++ Jun 22nd, 2008
Replies: 4
Views: 1,092
Posted By iamthwee
#include <string>
#include <sstream>
#include <iostream>

using namespace std;

class Foo
{
public:
double bar ( string line )
Forum: C++ Jun 20th, 2008
Replies: 5
Views: 1,093
Posted By iamthwee
You need to read a basic tutorials on arrays... Seeing this is c++ have a look at std::strings as well.
Forum: C++ Jun 18th, 2008
Replies: 7
Views: 692
Posted By iamthwee
That's a long winded way of doing it:

Other options include using std::strings and relevant functions such as substr()

And other c-style string functions...
Forum: C++ May 26th, 2008
Replies: 6
Views: 1,646
Posted By iamthwee
#include <stdlib.h>
#include <stdio.h>
#include <time.h>

#define MAX_DIGITS 1024

void gradeSchool ( int *a, int *b, int *ret, int d );
void doCarry ( int *a, int d );
void getNum ( int...
Forum: C++ Feb 14th, 2008
Replies: 7
Views: 3,137
Posted By iamthwee
>Make simple things easy.

Here, here. But what about the newlines and/or tabs?
Showing results 1 to 40 of 88

 


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

©2003 - 2009 DaniWeb® LLC