Register for your free account! | Forgot your password?

You last visited: Today at 04:25

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Conver

Discussion on Conver within the C/C++ forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2010
Posts: 514
Received Thanks: 65
Conver

Hi how i convert this code to c++ ? Please help me

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;

namespace Login_server__Final_version_
{
class Program
{
static void Main(string[] args)
{
Thread one = new Thread(WriteY);
one.Start();
Thread two = new Thread(WriteX);
two.Start();
Console.ReadLine();
}

static void WriteY()
{
for (int i = 0; i < 20 ; i++ )
{
Console.WriteLine("y");
}
}

static void WriteX()
{
for (int i = 0; i < 20 ; i++ )
{
Console.WriteLine("x");
}
}
}
}
szymek111 is offline  
Old 10/16/2012, 20:00   #2
 
elite*gold: 0
Join Date: Jul 2010
Posts: 388
Received Thanks: 196
Code:
#include <iostream>
#include <Windows.h>

using namespace std;

DWORD WINAPI writeX(LPVOID lpParameter) {
    for(int i = 0; i < 20; i++)
        cout<<"x";
    return 0;
}

DWORD WINAPI writeY(LPVOID lpParameter) {
    for(int i = 0; i < 20; i++)
        cout<<"y";
    return 0;
}

int main() {

    CreateThread(NULL, 0, writeX, NULL, 0, NULL);
    CreateThread(NULL, 0, writeY, NULL, 0, NULL);
    cin.get();
    return 0;
}
SmackJew is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
Conver Mysql to INI in LOFT
06/14/2010 - CO2 Private Server - 5 Replies
Hi, i'm using a loft source for my Conquer online private server, and I dont like to work with the MySQL. I would like to know how to make the INI file easy. I mean, i don't know what to write in my INI files, can someone make me an exemple? If he can send me a INI file already done for example. Tanks you and Good day.
[how] conver VPC to VMWARE
11/15/2009 - Metin2 PServer Guides & Strategies - 4 Replies
here free program convert files virtual pc to files VMWARE StarWind V2V convertion tool for virtual machines - StarWind Software http://www.starwindsoftware.com/download/1/StarWi ndConverter.exe



All times are GMT +2. The time now is 04:25.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.