on line 15 you define 'char real;'
line 35: 'if (!*real)'
breakdown, real is a pointer to line 15.
*real, returns the value pointed to by real.
! <value>
if that value is 0, it will be true,...
Type: Posts; User: Nor
on line 15 you define 'char real;'
line 35: 'if (!*real)'
breakdown, real is a pointer to line 15.
*real, returns the value pointed to by real.
! <value>
if that value is 0, it will be true,...
Live 45 should be somethng like
file.open("student.txt",ios::in|ios::out|ios::binary|ios::app);
if( !file.is_open() ){
//Handle error here
__asm nop;
}
Line 29: if(...
Ya, must have missed that, this was piced together years ago.
Edit:
what is the "Sai I Haten"?
I used google translator.
I piced this together some years ago with examples from books and a few other sites, hope it helps you.
ConLib.h
/* 'ConLibf.h' */
#pragma once
#include <windows.h>
#include <iostream>
enum...
!(1 && !(0 || 1)).
Remimber your order of operations.
( 0 || 1 ) = 1
! (1 && !(1))
! (1 && 0)
! (0)
1
you need to read the data off the socket.
select is letting you know there is data to be read. it will only clear out once you have read the recv() or recvfrom() the socket
On line 62, perror("recv"); should be "send"
See if your getting a connection error, if not we can figure out what is going wrong
read the udp socket is with recv or recvfrom, not select.
Someone correct me here,
but doesn't select require a connection to recive data on a socket,
and udp being connectionless, thus will...
I didn't read through your code so bare with me.
first you need to know what type of hand.
then say for 2+ players, you need to know the best hand.
below is a simple prototype function. with...
Beej's Guide to Network Programming
The best network programming guide i know of, and if you really like it, you'll buy the book.
Check your firewall settings and ensure that the port you setup...
you can setup a very simple server, by having your program open a socket, and use input from the socket as if it was keyboard input. and flushing all your output to the socket. basicly making a...
tcp and udp sockets have many differences. one being the way in which data can be writen and recived.
with tcp you have a large about of data you can send per write.
in udp the maximum amount of...
#include <iostream>
using namespace std;
//Global Values are bad and you shouldn't use them
//I'm using them b/c it is easyer to help you understand what I've done.
const double mol = 1.0;...
for(i=0;1<i<10;i++)
Lets read this statement in english
FOR this loop, 'i' starts at zero;
loop untill the next statement is false. One is less than 'i'. And 'i' is less than ten.
Increment...
Cprogramming.com - Tutorials - Bitwise Operators and Bit Manipulations in C and C++
if (i=0;1<i<10;i++)
you have used an if statement where it looks like you wanted a for statement
for( i=0; 1 < i < 10; i++)
Also on line 11. '|' and '||' are two different things.
you need...
most likely the problem is where your using !
line 60: is doing what you think its doing.
line 64: the "not' ! operator isn't doing what you think it is.
try this line
else if...
Yes mam, I am, and it is bad programming practice.
it would be much better to use template structer to define the sort.
but i'm trying to keep the reply as simple as possible.
Yes, the key...
if (s)he does not want to use a predefined sort algriumthim....errr spelling
but instead make his/her own. memcmp is an easy way to do it
#include <iostream>
#include <string>
//This...
You should realy start paying more attenchion in class. - i can't spell.
you will have to read to files, so declare to file input handles. lets say
fstream input1, input2
You should...
//Here is the original code with comments.
//No changes to the code, as to help you better understand the syntax
/* Even if you manage to compile this code sample, your program will crash
as...
Here is an advanced way to read the keyboard.
http://cboard.cprogramming.com/cplusplus-programming/142084-rfc-task-killer.html
I wrote this program to close a beta version of an app when it crashes, and locks up my system. The Program Works fine.
I'd like to know if I missed any error checking?
heres the code in full,
...
If your only needing read access to the protected structers/classes, then let your reading thread get a mutex lock, pass it a copy of the information requested, then release the lock.
Your reading...
you have a bottle neck in the code you shown,
that will effectly slow your application down,
as well as use a lot more memory than is required.
If your sending small files(under a meg) then you...