Forum: C++ Sep 10th, 2009 |
| Replies: 4 Views: 204 Okay, Θats t.he shortest program possible. |
Forum: C++ Sep 8th, 2009 |
| Replies: 4 Views: 204 #include<SDL.h>
#include<windows.h>
void apply_surface(int x,int y,SDL_Surface* source,SDL_Surface* dest)
{
SDL_Rect offset;
offset.x = x;
offset.y = y;... |
Forum: C++ Sep 8th, 2009 |
| Replies: 4 Views: 204 Well, I believe the answer/problem is in these few lines:
SDL_Surface* thing;
SDL_LockSurface(thing);
put_pixel32(thing,2,2,SDLred);
SDL_UnlockSurface(thing);... |
Forum: C++ Sep 3rd, 2009 |
| Replies: 2 Views: 194 In C++ code, how would I customize an extension.
I'm using C++ and my program outputs files, if/when I make an installer for it, I'd like to know how to make a program that can assoicate a file... |
Forum: C++ Aug 27th, 2009 |
| Replies: 6 Views: 517 I can just not cout and cin. |
Forum: C++ Aug 27th, 2009 |
| Replies: 6 Views: 517 I can't use cin or cout, it's an SDL program.
Also, it's char TO string, not the other way around. |
Forum: C++ Aug 27th, 2009 |
| Replies: 6 Views: 517 I'm getting inoput from a binary file, in hex.
And I want it to say the first nine characters... like "0x05 0x53,0x84 " ... and so on. So how do I turn a char in hex to a string in text? |
Forum: C++ Aug 11th, 2009 |
| Replies: 1 Views: 205 I get WSA Error 10038 if that helps.
With this:
if(totals = select((clients[numclients].sock+1),&Reader,NULL,NULL,&tv))
{
if... |
Forum: C++ Aug 11th, 2009 |
| Replies: 1 Views: 205 This is a Winsock select() server in C++ (I'm posting in this forum so of course) and I have two problems with it. (title)
1. My select olny returns above 0 when a connect request is recived, the... |
Forum: C++ Aug 3rd, 2009 |
| Replies: 3 Views: 186 |
Forum: C++ Aug 2nd, 2009 |
| Replies: 3 Views: 186 I have been using just SDL for alot, but it really olny does 2d things well. So I started learning OpenGL from the tutorials at http://anomtech.uuuq.com/ I was fine using Dev-C++ until the textures... |
Forum: C++ Jul 18th, 2009 |
| Replies: 3 Views: 314 This code works good on the first recive and send and recive and send but then starts echoing out 1's and -1's really fast I guess it also disconnects from the client. If I try to make it cout what... |
Forum: C++ Jul 18th, 2009 |
| Replies: 3 Views: 314 Shouldn't this code work? (select())
Well, this is basically a proxy.
It takes things from a program that is running on port 15777 and the puts it out to host on port 15776, but sence I added the... |
Forum: C++ Jul 2nd, 2009 |
| Replies: 7 Views: 752 If you could just tell me how to set a socket to non blocking and explain select() to me I'd be grateful. |
Forum: C++ Jul 2nd, 2009 |
| Replies: 7 Views: 752 Thanks, but do you know a tutorial on that? |
Forum: C++ Jul 2nd, 2009 |
| Replies: 7 Views: 752 I have done alot of stuff with Winsock, but it's all with sockets that can olni process one at a time.
Can anyone tell me how to make a non-blocking socket? [send and recive] |
Forum: C++ Jun 9th, 2009 |
| Replies: 3 Views: 321 More code:
Recive Data:
bool Socket::RecvData( char *buffer, int size )
{ |
Forum: C++ Jun 8th, 2009 |
| Replies: 3 Views: 321 I'm getting an error where it says I'm trying to use a null pointer. Then when I click ignore another error saying I tried to read or write protected memory. Any idea how to fix?
private:... |
Forum: C++ Jun 7th, 2009 |
| Replies: 1 Views: 383 Converting textBox1->Text into a basic string.
How would I do this in Visual C++ 9? |
Forum: C++ Jun 2nd, 2009 |
| Replies: 7 Views: 335 BTW I did add SDL_Init() to it. I used the eveything flag.
Here is Socket.ccp code:
//Socket.cpp
#include "Socket.h" |
Forum: C++ May 30th, 2009 |
| Replies: 7 Views: 335 |
Forum: C++ May 30th, 2009 |
| Replies: 7 Views: 335 |
Forum: C++ May 30th, 2009 |
| Replies: 7 Views: 335 No errors when compiling and I can comment out most of the main function and it still frezzes.
Remove the SDL parts and it won't freeze up but then again the SDL is most of the program.
CODE:... |
Forum: C++ May 25th, 2009 |
| Replies: 9 Views: 451 Here is my uploader...
if (mgcheck == "upload"){
string bob;
bob = getcotz(rst);
string job;
job = "uploaz " + bob;
char *cotz = new char[strlen(job.c_str())];
strcpy(cotz,job.c_str()); |
Forum: C++ May 25th, 2009 |
| Replies: 9 Views: 451 Here's what I got...
#include <cstdlib>
#include <iostream>
#include <fstream>
using namespace std;
int main(int argc, char *argv[])
{ |
Forum: C++ May 25th, 2009 |
| Replies: 9 Views: 451 |
Forum: C++ May 25th, 2009 |
| Replies: 9 Views: 451 I've tried just about everything.
Can anyone give me some help. |
Forum: C++ May 21st, 2009 |
| Replies: 4 Views: 251 Okay...
I was told that you needed to port forward if you were the host. (running the host on your pc)
But that the users (people running the clients) didn';t have to port forward to use their... |
Forum: C++ May 20th, 2009 |
| Replies: 4 Views: 251 SOCKETS.CPP FILE CODE:
//Socket.cpp
#include "Socket.h"
Socket::Socket()
{
if( WSAStartup( MAKEWORD(2, 2), &wsaData ) != NO_ERROR ) |
Forum: C++ May 20th, 2009 |
| Replies: 4 Views: 251 I was told olny the computer / home that the "host program" was in needed to be port forwarded, but you need port forwarding just to use the client too.
Base code for client program:
... |