pseudorandom21 166 Practically a Posting Shark

I see...
Thank you.

pseudorandom21 166 Practically a Posting Shark

Thanks for trying.

Anyone could tell me why this gives me an access violation??
I really have no clue why.

#include "cv.h" 
#include "highgui.h" 
#include <cstdio>
#include <iostream>
#include <fstream>
#include <vector>
std::vector<char> GetImageData(IplImage *img)
{
	std::vector<char> ret;
	for(int i = 0; i < img->imageSize; i++)
		ret.push_back(img->imageData[i]);
	return ret;
}
 // A Simple Camera Capture Framework 
 int main() 
 {
	// Create a window in which the captured images will be presented
	cvNamedWindow( "mywindow", CV_WINDOW_AUTOSIZE );
	// Show the image captured from the camera in the window and repeat
	while ( 1 ) 
	{
		// Get one frame
		//IplImage* frame = cvQueryFrame( capture );
		IplImage *frame = cvLoadImage("img.jpg", 1);
		
		if ( !frame ) 
		{
			fprintf( stderr, "ERROR: frame is null...\n" );
			getchar();
			break;
		}
		
		//Get Image Data and create new image, testing.
		std::vector<char> dat = GetImageData(frame);
		IplImage image(*frame);
		image.imageData = new char[dat.size()];
		for(size_t i = 0; i < dat.size(); i++)
			image.imageData[i] = dat[i];
		
		CvFont font;
		double hScale=1.0;
		double vScale=1.0;
		int    lineWidth=1;
		std::string imageSizeString = " " + dat.size();
		cvInitFont(&font,CV_FONT_HERSHEY_SIMPLEX|CV_FONT_ITALIC, hScale,vScale,0,lineWidth);
		cvPutText (&image,imageSizeString.c_str(),cvPoint(0,0), &font, cvScalar(255,255,0));
		//cvPutText (&image,"Image Size",cvPoint(100,100), &font, cvScalar(0,0,0));

		cvShowImage("mywindow", &image);
		cvReleaseImage(&frame);
		delete [] image.imageData;
		//cvShowImage( "mywindow", frame );
		// Do not release the frame!
		//If ESC key pressed, Key=0x10001B under OpenCV 0.9.7(linux version),
		//remove higher bits using AND operator
		if ( (cvWaitKey(10) & 255) == 27 ) break;
	}
   // Release the capture device housekeeping
//   cvReleaseCapture( &capture );
   cvDestroyWindow( "mywindow" );
   return 0;
 }
pseudorandom21 166 Practically a Posting Shark

I think Micro$oft can do eet.

pseudorandom21 166 Practically a Posting Shark

I'm sure there's a simple solution, but I wish someone would shed some light on the subject.

I've never really been the kind to do weird casting and such as is normal for C programmers.

pseudorandom21 166 Practically a Posting Shark

I'm attempting to transfer some OpenCV images over the network, I've been trying to put them into a format I can easily encrypt and transfer, but I'm almost certain it's not going to work properly.

Essentially the IplImage is a structure but it has a pointer that points to some image data in it along with the data members.

Is there an easy way to copy the image data, cast the entire structure to a character array, and transfer them over the network, then reassemble?

Here's my first idea, lots of typing and I'm pretty sure it's already got problems.

#include "cv.h" 
#include "highgui.h" 
#include <cstdio>
#include <iostream>
#include <fstream>
#include <vector>


struct ImageBuffer
{
	std::vector<int> imageInfo;
    //int  nSize;             /* sizeof(IplImage) */
    //int  ID;                /* version (=0)*/
    //int  nChannels;         /* Most of OpenCV functions support 1,2,3 or 4 channels */
    //int  alphaChannel;      /* Ignored by OpenCV */
    //int  depth;             /* Pixel depth in bits: IPL_DEPTH_8U, IPL_DEPTH_8S, IPL_DEPTH_16S,
    //                           IPL_DEPTH_32S, IPL_DEPTH_32F and IPL_DEPTH_64F are supported.  */
    //char colorModel[4];     /* Ignored by OpenCV */
    //char channelSeq[4];     /* ditto */
    //int  dataOrder;         /* 0 - interleaved color channels, 1 - separate color channels.
    //                           cvCreateImage can only create interleaved images */
    //int  origin;            /* 0 - top-left origin,
    //                           1 - bottom-left origin (Windows bitmaps style).  */
    //int  align;             /* Alignment of image rows (4 or 8).
    //                           OpenCV ignores it and uses widthStep instead.    */
    //int  width;             /* Image width in pixels.                           */
    //int  height;            /* Image height …
pseudorandom21 166 Practically a Posting Shark

Nope, still a .DLL, just embedded as a resource.

pseudorandom21 166 Practically a Posting Shark

Can I use a DLL embedded in an executable (as a resource) without writing it to the disk?

(Windows)

pseudorandom21 166 Practically a Posting Shark

Trying to connect to my own machine:
Client (exception thrown, target machine actively refused it):

using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.Net.Sockets;

namespace CS_LAN_Client
{
    class Program
    {
        static void Main(string[] args)
        {
            TcpClient client = new TcpClient();
            IPEndPoint ep = new IPEndPoint( IPAddress.Loopback, 0);
            client.Connect(ep); // <-- Exception!

            byte[] buffer = new byte[2048];
            NetworkStream ss = client.GetStream();
            ss.Read(buffer, 0, buffer.Length);
            Console.WriteLine(buffer.ToString());//Doesn't work, I know.
            ss.Close();
            client.Close();
        }
    }
}

And server: (no problems afaik)

using System;
using System.Collections.Generic;
using System.Text;
using System.Net.Sockets;
using System.Net;
namespace CS_LAN_Server
{
    class Program
    {

        static void Main(string[] args)
        {
            TcpListener server = new TcpListener(IPAddress.Any, 0);
            server.Start();
            TcpClient client = server.AcceptTcpClient();
            
            NetworkStream ns = client.GetStream();
            byte[] message = Encoding.ASCII.GetBytes("Now is the winter of your discount tent!");
            ns.Write(message, 0, message.Length);

            client.Close();
            server.Stop();
        }
    }
}
pseudorandom21 166 Practically a Posting Shark

Article suggests memory fragmentation might be a bit of a problem.

Personally I'm inclined to ignorantly suggest it might actually be a stack overflow, check the project options--you might be able to increase the size of the stack for your program (not guaranteed to fix anything).

pseudorandom21 166 Practically a Posting Shark

Is there some trick to networking between LAN machines?
I want a client/server system on the network but I haven't a slightest about the IP.

I'd like to avoid dropped packets, so from my limited knowledge I'd go with TCP.
Etc.

How do I locate another machine via IP on a LAN? There are multiple machines on my LAN with the same external internet IP address.

Sorry for stupid questions but I have answered a lot of those in my day, so if you would kindly entertain my ignorance it would be much appreciated.

pseudorandom21 166 Practically a Posting Shark

No I think you have to use the OS API.
Sorry.

pseudorandom21 166 Practically a Posting Shark

@Jwent,

What do you think of the home terminal/mainframe idea? Is Windows 7 equipped to handle such a task?

pseudorandom21 166 Practically a Posting Shark

These days the use of mainframe computers and terminals is highly outdated, but I'd like to predict it will make a comeback sometime soon.

Today our terminals, our smartphones and tablets and even laptops and TVs are much more powerful than they used to be--and much more mobile.

Instead of the one-desktop-one-user at a time scenario, what if there was an OS that ran on high-performance hardware shared by the entire household?

instead of sitting in a chair all day, a new form of mobile terminal (one that will probably be produced in the next couple of years just from a blind estimate) would enable the power of the desktop from a mobile platform.

I just don't see the point of having a 3Ghz processor in a mobile phone if your desktop at home is just sitting there unused. This may be due in part to an infrastructure problem, perhaps ISP subscribers just don't have the bandwidth to handle all that wired/wireless communication.


What do you guys think, do you think the terminal system could make a comeback in a modern world, or do you side with the "everything gets smaller and more powerful, why a giant mainframe?" point of view?

If I were to try this at home, I would probably use a top-notch desktop running Windows 7/8 (and hoping it supports multiple users at the same time), with a few cheap wifi tablets to use the desktop's resources.

How …

pseudorandom21 166 Practically a Posting Shark

College coursework....

pseudorandom21 166 Practically a Posting Shark

The best way?
Probably a database of some sort, either just a file or an actual database (SQL, Access, etc.)

Main thing is, you need a way to store the word, and it's definition in a logically related manner. You could use markers to mark the begin/end of data in the file or something.

pseudorandom21 166 Practically a Posting Shark

Java:
I have a bunch of stuff drawn to the blank space of a JApplet app.

I need to add a JButton at a specific location.
I don't know how.

What's the easiest way to do this?

pseudorandom21 166 Practically a Posting Shark

May I suggest the OpenPOP library? I've used it in several projects and haven't had any problems yet.

The problem isn't POP it's gmail.

pseudorandom21 166 Practically a Posting Shark

Okay screw POP3 and google.
IMAP for t3h win.

Also, this lib: http://mailsystem.codeplex.com/

pseudorandom21 166 Practically a Posting Shark

I still haven't figured out how to make it work.
:(

pseudorandom21 166 Practically a Posting Shark

Okay now I know why, some strange gmail POP3 stuff, as per:
http://groups.google.com/group/Gmail-Help-POP-and-IMAP-en/browse_thread/thread/8be2c0b2bf383c15/7c57310cd5b11fc9

it for some reason lets you access them in batches by sending "QUIT" then reconnecting.... or something strange.

pseudorandom21 166 Practically a Posting Shark

My simple POP3 client (set up for Gmail) isn't downloading all of my messages...
Any idea why?

I have 350 messages in my inbox and the program only says 296 of them show up.

Program.cs

using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.Net.Sockets;
using System.Net.Security;
using System.IO;
using System.Data;

namespace POP3Sharp
{
    class Program
    {
        static void Main(string[] args)
        {
            PopGmail mail = new PopGmail();
            Console.Write("Email: ");
            string email = Console.ReadLine();
            Console.Write("Password: ");
            string password = Console.ReadLine();

            Console.WriteLine("Connecting.");
            if (!mail.Connect("pop.gmail.com", 995))
            {
                Console.WriteLine("Connect failed, attempted connection to pop.gmail.com on port 995 (client).");
                return;
            }
            Console.WriteLine("Connected.");
            if (!mail.Login(email, password))
            {
                Console.WriteLine("Login failed, valid username/pass? POP3 enabled on gmail settings?");
                return;
            }

            int messageCount = mail.GetMailCount();
            Console.WriteLine("Number of email messages reported: " + messageCount.ToString());

            //for(int i = 1; i <= messageCount; i++)
            //{
            //    byte[] bt = Encoding.ASCII.GetBytes(mail.GetMessage(i));
            //    FileStream fs = new FileStream("Emails\\" + i.ToString() + ".txt", System.IO.FileMode.Create);
            //    fs.Write(bt, 0, bt.Length);
            //    fs.Close();
            //}

            Console.WriteLine("Press any key to exit.");
            Console.ReadKey();
            mail.Disconnect();
        }
    }
}

and more importantly,
POPGmail.cs

using System;
using System.Collections.Generic;
using System.Text;
using System.Net.Security;
using System.Net.Sockets;
using System.Web;
using System.Windows.Forms;

namespace POP3Sharp
{
    class PopGmail
    {
        TcpClient m_tcpClient = new TcpClient();
        SslStream m_sslStream;
        int m_mailCount;
        byte[] m_buffer = new byte[8172];

        public PopGmail()
        {
            m_mailCount = -1;
        }

        /// <summary>
        /// Connect to pop3 server "host" using "port" and auth SSL as client.
        /// </summary>
        /// <param name="host"></param>
        /// <param name="port"></param>
        /// <returns></returns>
        public bool Connect(string host, int …
evry1falls commented: Very helpful, i'm using it to develop a vb.net app. +0
pseudorandom21 166 Practically a Posting Shark

Here is a sort of description to my yet-unimplemented AI agent to play tic-tac-toe.

It doesn't have to win, it just has to work, and my description of it has to be good.

Tell me what you think:

/*

"RATION_AL"

The goal of my agent is to implement an agent function that
doesn't require omniscience and instead will rely entirely upon
rational decisions based upon the formal definition of a rational agent,
primarily utilizing the percept sequence, and some minor built-in knowledge,
it will alter it's behavior from experience gained by the percept sequence,
but will also remain largely reflex-oriented.

With Tic-Tac-Toe against another agent, omniscience in the simple sense,
isn't possible due to the variety of techniques available, 
including knowledge-based and entirely random move placement.

Success (for my agent) at each stage of the percept-sequence,
should likely be gauged by the state of the task environment in which the "agent"
resides--after the opponent's move.

Due to the finite nature of a 3x3 matrix, a knowledge-based approach encompassing
every possible action that can be performed could be employed perhaps successfully,
and one might argue that knowledge of every possible outcome could be considered
omniscience (as far as the agent is concerned), but I'm sure that's debatable 
and I don't have a definite answer.  With further review of the material,
this type of table-driven or knowledge-based approach may be unfeasible with
an astronomical number of possibilities.

Let's get it on!


The task environment is a fully observable, strategic, …
pseudorandom21 166 Practically a Posting Shark

Googlesyndication = star on shirt to be worn at all browsing sessions.

pseudorandom21 166 Practically a Posting Shark

Sorry dex that didn't help.

But, I'll give a try to dynamic linking.

pseudorandom21 166 Practically a Posting Shark

I can't help but think it could be done better without all the macros and one giant main function.

Btw, are you using C or C++ for this? I think classes could be used to your advantage.

pseudorandom21 166 Practically a Posting Shark

So I can set a global low level keyboard hook from within a DLL pretty easily, but does it actually load that DLL into every process? How is it then, "Global" ?

Any useful insight into the way this works?

I use the command line program "tasklist" with the /M option to view loaded .DLLs and I don't even see the global hook DLL loaded in my app.

Something strange going on?

Also I might be statically linking to the DLL...

pseudorandom21 166 Practically a Posting Shark

Is there a library that's easy to setup and use with Visual Studio 2010 for AES encryption/decryption?

I've been fiddling with CryptoPP and it's endless link errors and iterator_level_not_equal error messages for an hour now, so I think it's time to look for an installer or a new lib.

Any suggestions?

pseudorandom21 166 Practically a Posting Shark

I do appreciate the effort but I'm not going to copy/paste it, I'll just learn to use reflection one day.

pseudorandom21 166 Practically a Posting Shark

Is there a simple way to get a list/array of all the predefined colors?
(without listing them all individually) ?

It seems as though the colors are properties of the class "Color" rather than an enumeration.

pseudorandom21 166 Practically a Posting Shark

It's easier with a library that abstracts the complicated socket stuff.

Right now I would probably consider using boost for it (personally).

#include <boost/asio.hpp>

void TransferData( std::string data )
{
   //Server/port.
   boost::asio::ip::tcp::iostream con("server","9001");//or protocol, like "HTTP"
   if( !con )
      ;//Connecting failed or something.
   else
      con << "Ehlo their mate. Have sum datums." << data << std::flush;
   con.close();
}

You can find an installer for boost here: www.boostpro.com
Then in your project settings -> include directories,
add the main boost folder to the include directories
and the "lib" folder to the lib directories.

pseudorandom21 166 Practically a Posting Shark

Functions cannot be defined or declared inside of other functions.

Use this for reference:

#include <iostream>
using namespace std;

//Below is a function prototype or "declaration"
void ShowMessage();

//Entry-point.
int main()
{
   ShowMessage();
   //Compiler inserts "return 0;" automatically.
}

//Function body or "definition"
void ShowMessage()
{
   cout << "Hello, CPP world." << endl;
}

Also note that the entry-point is a definition only, but is still a function.

pseudorandom21 166 Practically a Posting Shark

http://live.reuters.com/Event/Iowa_Caucuses_2012

Iowa Caucuses, on the page you can find some stuff regarding the various candidates...

pseudorandom21 166 Practically a Posting Shark

I am wondering under Linux what would 'echo $?' give you back, after you run a program with no return value.

My attempt to make such a program have failed :
void.cpp:3:12: error: ‘::main’ must return ‘int’. - I am still curious though.


@manfredbill - The problem is you are trying to use the index operator on a non-array like object.
In your main you declared one student structure called 's'. You're using the index operator, but 's' is not an array, it is a single type of data. It's like saying:

int x = 124;
x[2] = 0; // illegal use of operator []

That's why you got the error message. You can fix it by making an array of your structure.

student[5] array_of_structure_student;

Now you can store more student information.

Actually Lurr, I'm not aware you can use the java-style brackets in that fashion with C++.

try: Student arrayOfStructureStudent[5];

pseudorandom21 166 Practically a Posting Shark

Control to traverse a directory and select files/folders.

Control for webcams.

Control for direct input device manipulation (probably not a C# problem).

I haven't searched the snippet section lately so I don't know if those are in there already.

pseudorandom21 166 Practically a Posting Shark

QT, Irrklang, Windows API.

All are probably complicated to use.

Why not try to find a good IDE for csound? If I wanted to work with sound I would probably use csound or learn enough about sound to implement my own with an audio library for C/C++.

pseudorandom21 166 Practically a Posting Shark

What version of boost are you using?
It compiles fine for me (the exact code you posted, with some additional include files).

Here, try this (same code):

#include <iostream>
#include <cstdlib>
#include <ctime>
#include <vector>
#include <algorithm>
#include <memory>
#include <boost/shared_ptr.hpp>

struct Test
{
public:
  Test(const unsigned int input) : a(input){}
  int a;
};
 
struct SortFunctor
{
  bool operator()(std::shared_ptr<Test>& object1, std::shared_ptr<Test>& object2)
  {
    return(object1->a < object2->a);
  }
};
 
//////////////////////////
int main (int argc, char *argv[])
{
  srand(time(NULL));
 
  std::vector<std::shared_ptr<Test> > objects;
  std::shared_ptr<Test> object1(new Test(rand()%50));
  objects.push_back(object1);
 
  std::shared_ptr<Test> object2(new Test(rand()%50));
  objects.push_back(object2);
 
  std::sort(objects.begin(), objects.end(), SortFunctor());
 
  return 0;
}

Compiled with VS2010 using boost 1.47 (installer on boostpro.com)

pseudorandom21 166 Practically a Posting Shark

please post code in the code tags [code] /* code here */ [/code].

Then, it seems you're using a highly outdated compiler that supports a non-standard version of C++, perhaps you would wish to upgrade to a newer compiler so that we (and others) can better help you?

There are a number of freely available up-to-date compilers for many platforms, please look into it.

Also, please see this thread with regard to using

void main()

:
http://www.daniweb.com/software-development/cpp/threads/403189

pseudorandom21 166 Practically a Posting Shark

Any plans on needing the class to be "thread-safe" ?

Also, @firstPerson, most times you need to pass an instance of a class as a separate param to use with member functions of a class as suggested by his "OO" stuff. I bet there's a boost fix for this additional trouble worth investigating if you should go that route.

//something like
template<typename Func_1, typename Instance_1>
void onEachItem(const Func_1 func, const Instance_1 inst){
  for each item i, in this set
    inst->func( i );
}
pseudorandom21 166 Practically a Posting Shark

Most of the features you want are probably available via the operating system API, I'll assume you're using Windows so here's the API ref.

http://msdn.microsoft.com/en-us/library/ff818516(v=vs.85).aspx

of course you don't have to roll your own, there is plenty of code available for random stuff.
http://www.codeproject.com/KB/cpp/AddColorConsole.aspx

otherwise here's the console link:
http://msdn.microsoft.com/en-us/library/ms682087(v=VS.85).aspx

That codeproject lib looks like a good one because it implements changing text colors as some stream manipulators.

Agouri commented: Helpful links in my C++ help thread +0
pseudorandom21 166 Practically a Posting Shark

From the website FAQ section of Bjarne Stroustrup, designer and original implementer of C++

The definition

    void main() { /* ... */ }

is not and never has been C++, nor has it even been C. See the ISO C++ standard 3.6.1[2] or the ISO C standard 5.1.2.2.1. A conforming implementation accepts

    int main() { /* ... */ }

and

    int main(int argc, char* argv[]) { /* ... */ }

A conforming implementation may provide more versions of main(), but they must all have return type int. The int returned by main() is a way for a program to return a value to "the system" that invokes it. On systems that doesn't provide such a facility the return value is ignored, but that doesn't make "void main()" legal C++ or legal C. Even if your compiler accepts "void main()" avoid it, or risk being considered ignorant by C and C++ programmers.
pseudorandom21 166 Practically a Posting Shark

I've been fiddling with some boost spirit stuff, and my code seems to start infinitely looping somewhere in the standard library stuff.

Any ideas what's wrong?

The qi::phrase_parse works very well, but the karma gets me.

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
//#include <boost/spirit.hpp>
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/karma.hpp>
using namespace std;

int main()
{
	using namespace boost::spirit;
	string input = "100  ,     200    , 200 , 300 , 300, 300, 400, 400, 400, 400";
	vector<int> r;
	//int value = 0;
	//boost::spirit::qi::parse(input.begin(),input.end(),boost::spirit::qi::int_, value);
	//cout << value << endl;
	qi::phrase_parse( input.begin(), input.end(), *(qi::int_), (*(qi::space) >> ',' >> *(qi::space)), r);
	string out;
	back_insert_iterator<string> inserter(out);
	karma::generate_delimited( inserter, '(' << karma::int_ << ')', (*(karma::space) << ',' << *(karma::space)), r);
	cout << out << endl;
	//for_each(r.begin(), r.end(), [] (int n) { std::cout << n << std::endl; } );
}

In the middle of this document:
http://www.boost.org/doc/libs/1_48_0/libs/spirit/doc/html/spirit/abstracts/attributes/compound_attributes.html

pseudorandom21 166 Practically a Posting Shark

LGPL, got it.
No one cares aboot my code anyway.

pseudorandom21 166 Practically a Posting Shark

If I write code and have a copy of the file with a different copyright on it (copyrighted as my IP), can it be used in a commercial application without worry if I, the author, also publish the exact same material under the GPL?

pseudorandom21 166 Practically a Posting Shark

Normally it's bad practice to operate directly on the memory the std::string class is managing for you, that's why the pointer returned is a [b]const[/b] char * .

You'll probably have to copy the string data to avoid getting error messages.

i.e.,

char *buffer = new char[data.size()+1];
strcpy(buffer,data.c_str());
//buffer is now what you can modify, but you must delete it with "delete [] buffer;"
int r = Decode_VL64(buffer);
delete [] buffer;
return r;
pseudorandom21 166 Practically a Posting Shark

Simply put, no.

No to the first question, or the second?

pseudorandom21 166 Practically a Posting Shark

Can I use my own code that I slapped a GPL on and provided to sourceforge in my own commercial application?
In that way, does the GPL somehow relinquish my own rights to my IP?

pseudorandom21 166 Practically a Posting Shark

Please see the link to the youtube video in my signature.

If you can stand my voice and horrible narrating it will show you one of the best ways to figure out a problem like that, assuming you're using Visual Studio.

Also if you're copying a project you may want to make a blank project, then copy and paste the files you want to work with into the new empty project's directory (Documents/VS2008/projects usually), then in the IDE, right click on the project name and select "add existing item" to add them to the new "solution"/project.

pseudorandom21 166 Practically a Posting Shark

I have a library for some simple windows hooks written in C++/CLI that you can use in C#.

It's pretty app-specific (written for EasyScreenCLI) but I'm sure you can adapt it to your needs with minimal difficulty.

It has a mouse cursor hook too that gets the X/Y coordinates, somewhat fun to play with.

http://www.mediafire.com/?7iuwb3qakow1dqd

Of course I don't care what you do with the code, but don't blame me if it doesn't work right, y'know. Agree by downloading, etc. etc.

Also, to disable ctrl + alt + delete you can hook the ctrl and alt keys and prevent them from proceeding to the OS (as far as I know).
So you break the sequence and it only processes the "delete" key.
Can disable alt + tab in the same way, don't forget the left and right windows and alt keys though!

To use it you build the lib and add a reference to it in your C# app, the "dummyform" class is something that is invisible on windows aero enabled machines but is actually a foreground maximized window, sort of blocks clicking, but it's still just a form window.

If you don't have vs2010 and have vs2008 or something, try opening the .csproj file instead of the .sln (usually works for me).

pseudorandom21 166 Practically a Posting Shark

Well I have one that's working pretty darn good now.

bool ASIO_Internet_Client_TCP::WaitForReadyRead( unsigned int seconds_to_wait )
{
	assert(socket != nullptr);
	unsigned int ms = 0;
	while( !socket->available() )
	{
		boost::asio::io_service ios;
		boost::asio::deadline_timer t(ios, boost::posix_time::milliseconds(10) );
		t.wait();
		ms+=10;
		if( ms > (seconds_to_wait*1000) )
			return false;
	}
	return true;
}
pseudorandom21 166 Practically a Posting Shark

Yeah actually on Visual Studio 2010 the option is still there, it's under the

project properties -> C/C++ -> Language

tab.