now that makes sense!!!
i was trying to take nix winsock pages (as it seems those are the majority out there) and use the "if you have windows" sections, but yeah all screwed up. i did post this...
Type: Posts; User: Crossfire
now that makes sense!!!
i was trying to take nix winsock pages (as it seems those are the majority out there) and use the "if you have windows" sections, but yeah all screwed up. i did post this...
ok went back to working on my server side TCP/IP program.
so far I am able to create, listen, and connect from a client.
just having probs with what to do next.
my goal is the following:...
not exactly a sub-forum of c programming....
if there was a windows sub-forum under cprogramming then I would have posted this there. instead I posted it under the c programming forum, because that is what this is, c programming!
thank you...
ok went back to working on my server side TCP/IP program.
so far I am able to create, listen, and connect from a client.
just having probs with what to do next.
my goal is the following:
...
opens fine for me, BUT does have a warning about int main,
and a warning about gets, I would recommend changing gets() to a scanf()
guess you missed the "fixed the bind"
now what ment, what is my next step!
working on the accept() part.
will post code in a few!
//-----update-----//
changed the code to
#include <winsock2.h>
#include <Windows.h>
#include <stdio.h>
#define PORT 8888
int main(void)
{
ok started a new from nothing, going down steps...
#include <winsock2.h>
#include <Windows.h>
#include <stdio.h>
#define PORT "8888"
int main(void)
sorry I missed copy and paste of a part!
basically, I do not know winsock, so I am basically asking for a "flow chart" of sorts of how to do this
would rather start a program myself and do it,...
ok this is one I found made for windows.
no idea what 3/4 of it means or how it does what it does!
especially the WPI type commands (something.something.something)
trying to take this idea,
get...
beej`s guide was good, but confusing trying to edit it to fix the errors I get from the windows side!
the MSDN is more API then I want to deal with!
is there a "simplier" c based, no api type...
SATYA, you are still a little off!!!
AccipiterZ, that is why I said look into the "Loop Counter for your valid grade count"
in a loop for example
for(int x = 0;x < 10;x++)
ok I would say your percentage formula is backwards! (follows the solving of cross multiply)
passing grades X
---------------- = ---
valid grades 100
either way,...
well looking at your code, starting off your MAIN should be a returning function (int main)
which also means your "end of program" would include return 0
now running the program, this was what I...
although I skipped data checking, this had worked for me!!!
scanf with two different data types!
#include <stdio.h>
int main (void)
{
/* variable definition: */
int year;
ok to start, windows based program, using pelles c ide
winsock2, using "sample" codes, able to connect, BUT no clue what 1/2 of the codes do, and most of the coding is for nix based systems!
...
you just started a while loop,
also you removed 1/2 of your code!
like matticus said,
DO
code
ok after reading the 27 posts, all i can say is O.....M....G......
This post went a little nuts didnt it???
not to mention doing all the work for the new kid.....
i am surprised you answered Adak, especially seeing this was posted 3 hours after the last part of "http://cboard.cprogramming.com/c-programming/160343-c-prog-read-txt-file-strings-integers.html"
...
or use win api functions, so you can "goto" an x, and y value, and just print over the text that is there, that way if you want just one line to clear, and leave the rest, you can just clear one line...
never used perror or strerror + errno before, ill look into that
the blocking is exactly what i want, to send an int, then the client not "looping" to accept the new input untill the server responds...
I lied!!! i have the start of a server code, it isnt the best, but i pieced it together from about 4 diff tutorials, and sources, removed the win32 or *nix "choices" and fixed a few probs with the...
ok, this will be a post that i dont have code for yet!
not HW, not employment, just me learning (yet again!)
i have been studying sockets, and confused as hell, mostly because almost everything...
the leapyear check i use is
if (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0))
if true, it is a leap, if not true it is not!
this saves a handful of if if else checks!
good luck...