Forum: C++ Nov 2nd, 2009 |
| Replies: 1 Views: 418 // strings and c-strings
#include <iostream>
#include <cstring>
#include <string>
#include <vector>
using namespace std;
vector<string> SplitString (string aString)
{ |
Forum: Graphics and Multimedia Oct 19th, 2009 |
| Replies: 4 Views: 982 What the hell is this? Go get yourself a flash actionscript 3.0 book or something.
I'm being SERIOUS. |
Forum: Graphics and Multimedia Oct 18th, 2009 |
| Replies: 5 Views: 1,042 I don't know if this is the best practise. It probably isn't but you could declare a global variable at the very top of the code then assign it later. |
Forum: Graphics and Multimedia Oct 18th, 2009 |
| Replies: 5 Views: 1,042 What exactly are you trying to do?
Get those variables into an xmllist or something? |
Forum: C++ Oct 13th, 2009 |
| Replies: 3 Views: 300 Next time don't leave your h/w to the last minute. |
Forum: C++ Oct 11th, 2009 |
| Replies: 8 Views: 337 oops i meant
vector<bool>setlist;
setlist.push_back(true);
setlist.push_back(false);
setlist.push_back(true);
setlist.push_back(true); |
Forum: C++ Oct 11th, 2009 |
| Replies: 8 Views: 337 I think your easiest answer would be
vector<int>setlist;
setlist.push_back(3);
setlist.push_back(12);
setlist.push_back(4);
string s1 = ",";
cout << "{"; |
Forum: C++ Oct 11th, 2009 |
| Replies: 8 Views: 337 Well at the end can't you just do an string erase on the last but one element?
string p = "{1,2,3,24,}";
p.erase(p.length()-2,1); |
Forum: Graphics and Multimedia Oct 10th, 2009 |
| Replies: 13 Views: 1,656 try:
http://scriptplayground.com/tutorials/as/getURL-in-Actionscript-3/ |
Forum: Graphics and Multimedia Oct 10th, 2009 |
| Replies: 13 Views: 1,656 Well what version of flash are you using?
What version of actionscript are you using? |
Forum: C++ Sep 28th, 2009 |
| Replies: 23 Views: 684 Well if you WANT to allow duplicates all you need is a std::vector |
Forum: C++ Sep 28th, 2009 |
| Replies: 23 Views: 684 >! myfile.eof()
using that is not advised.
And use std::string instead. |
Forum: C++ Sep 17th, 2009 |
| Replies: 3 Views: 580 set a variable at the beginning then add them all up:
eg.
int total = 0;
for ( int i = 0; i < 10; i++ )
{
total = total + i;
} |
Forum: MySQL Aug 29th, 2009 |
| Replies: 2 Views: 520 Have you installed the mySQL ODBC datasource driver? |
Forum: C++ Aug 26th, 2009 |
| Replies: 11 Views: 521 Maybe might be of use?
http://www.daniweb.com/code/snippet900.html |
Forum: Python Aug 23rd, 2009 |
| Replies: 9 Views: 561 here (http://lmgtfy.com/?q=python+sys.argv) |
Forum: Python Aug 23rd, 2009 |
| Replies: 4 Views: 377 They're special functions designed to make your life EASIER for reading and writing, in this example, HTML. |
Forum: Graphics and Multimedia Aug 10th, 2009 |
| Replies: 6 Views: 664 Yep post #5 was the correct answer, or should I say the shortest answer/fix. |
Forum: Graphics and Multimedia Aug 10th, 2009 |
| Replies: 6 Views: 664 I'd just make a global variable
var loginXml:XML;
var loader:URLLoader = new URLLoader();
loader.load(new URLRequest("logindata.xml"));
loader.addEventListener(Event.COMPLETE, loadXML);
var... |
Forum: Graphics and Multimedia Jul 28th, 2009 |
| Replies: 8 Views: 533 I just can't imagine not begin able to have the drag and drop components/especially custom ones... papervision3d, yahoo astra components etc. I wouldn't have a clue how to do this with just code.
... |
Forum: Graphics and Multimedia Jul 28th, 2009 |
| Replies: 8 Views: 533 In my opinion nothing beats the full flash suite.
You need all the little perks like the timeline and everything. |
Forum: C++ Jul 21st, 2009 |
| Replies: 8 Views: 355 > 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 21st, 2009 |
| Replies: 8 Views: 355 #include <cmath>
#include <iostream>
using namespace std;
int main ()
{
cout << ( log ( 100000000.0 ) / log ( 2.0 ) ) + 1;
getchar();
} |
Forum: C++ Jul 21st, 2009 |
| Replies: 8 Views: 355 Just thinking aloud so most probably wrong.
Can't you just take logs to find the answer? |
Forum: C++ Jul 20th, 2009 |
| Replies: 14 Views: 579 int i = 0;
while ( std::getline ( inFileStream, line ) )
{
file[i] = line;
//cout <<line<<endl;
i++;
} |
Forum: C++ Jul 13th, 2009 |
| Replies: 4 Views: 325 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 26th, 2009 |
| Replies: 17 Views: 478 I'm sorry but that doesn't tell us much.
Post all your code including your text file and the code you use to read in that password. |
Forum: C++ Jun 23rd, 2009 |
| Replies: 6 Views: 300 Yes, but the OP already stated in another thread, that he/she is forced to use turbo c++ at their school. |
Forum: C++ Jun 8th, 2009 |
| Replies: 3 Views: 495 Well can't use just do #include <string> in main() then? |
Forum: C Jun 8th, 2009 |
| Replies: 5 Views: 532 Read the documentation.
http://www.cplusplus.com/reference/clibrary/cstring/strncat/ |
Forum: C++ Jun 8th, 2009 |
| Replies: 8 Views: 259 Well do you know what pass by reference means, if not read up on it. |
Forum: C++ Jun 8th, 2009 |
| Replies: 8 Views: 259 & is pass by reference is that what you require? |
Forum: C++ Jun 8th, 2009 |
| Replies: 8 Views: 259 why have you got a temp, surely you would just pop anything that is negative and that's that. |
Forum: VB.NET Jun 8th, 2009 |
| Replies: 3 Views: 2,017 You need to specify the writing mode as being:
IO.FileMode.Append |
Forum: C++ May 29th, 2009 |
| Replies: 8 Views: 477 try changing
char a;
a = 'A';
to:
string a;
a = "A";
and do a |
Forum: Java May 28th, 2009 |
| Replies: 6 Views: 647 It all depends, if you want a numerical analysis approach it is a piece of ****. i.e using the trapezium rule for integration.
Something more than that, such as mathematica's engine would be a lot... |
Forum: C++ May 27th, 2009 |
| Replies: 2 Views: 178 maybe rec[0] == rec[rec.length()-1] |
Forum: C++ May 22nd, 2009 |
| Replies: 7 Views: 366 You need to give more details than that. What exactly are you using? |
Forum: C May 22nd, 2009 |
| Replies: 5 Views: 403 Are you saying you want a function such as:
function ( /* arg1, arg2, arg3, ... , argN */) |
Forum: C++ May 20th, 2009 |
| Replies: 5 Views: 246 |