Hmm, I am not sure whether I have understood your answer. My progam is supposed to check square by square the whole board (from 0,0 till 7,7). After a new queen is checked, if the result is that that...
Type: Posts; User: PutoAmo
Hmm, I am not sure whether I have understood your answer. My progam is supposed to check square by square the whole board (from 0,0 till 7,7). After a new queen is checked, if the result is that that...
Hello.
I have attempted to implement a program that solves the 8 Queens problem. For those of you who have not heard of it before: The program is to find all possible combinations of 8 queens on...
Thank you, vVv. Good example :)
Hi,
What does mapping mean? Does the mmap() function just copy the contents of a file into the calling processīs address space?
This is just a language problem. I donīt know what mapping mean....
In order to count vowels use something like:
char vowels[] = {'a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'}
for ( i = 0; i < 10; i++)
if ( ch == vowels[i] )
ch_is_a_vowel = 1;
Thanks alot,Sargnagel.
I deduce from your explanation that the kind of buffering used on I/O is dependent on the stream and not on the function. So fputc() might sometimes do an unbuffered output,...
Hello all.
How could I edit my vim config file so that tabs (when c programming) take just 4 spaces?
Hello all !
I am reading chapter 5 of Steven's APUE. He mentions that "The standard I/O library does not buffer the characters". But he also gives the standard fputc function as an example of line...
That's what I also wonder about. I want mylib.c to become a dynamically linked library so I can use it with any program just loading those functions needed, when needed.Instead of linking the whole...
Would that make mylib.c a dynamic library?
Will my main program and any other program using that library just load those functions needed?
Thank you, xlord.
Could you, please, use the filenames I have given as examples instead of blah-files?
Hello all.
I just have a simple question. How do I compile a function library to be accessed dinamically?
Let's say I have these 3 files:
main.c
#include "mylib.h"
Thank you Hammer and quzah.
I was using a wrong port. Port 13 is reserved to Daytime service. I changed to a higher port number (2501). It worked fine.
I also did some error checking, as you...
I am new to network programming. So far I am just analyzing programs written by others. I have just one computer so I have to use address 127.0.0.1 when running these programs.
When I attempt to...
Removing file "/tmp/mysocket" really helped.
Thank you, Hammer.
Port? I thought AF_UNIX domain didn't use any ports.
Error from perror: "Address is already in use". As if there was another socket using that address. (??)
Why do I keep getting bind() error when attempting to execute this server?
By the way, it's meant to get to integers, calculate sum and return sum to client.
Any help appreciated !
#include...
Prelude, Quzah,
I have seen you posting replies to posts that I am sure are just homework. The fact that an assignment is difficult to resolve doesn't mean it is not homework. I am sure you answer...
It took me 3 minutes before I realized you used a recursive function.
My teacher will love it :D
I see you're close to hit 1K posts Q !!
These are my 2p :
I have some homework to be done til tomorrow. Yes, homework.
My homework is: I have to write a program that prints all integer...
Thank you, guys. Actually what I meant was indentation (not tab). I would like smaller indentations when writing code.
I have two questions regarding program below.
1) Since ch is just an integer, where do all characters I enter after first one get saved? Let's say I enter abcdefg. 'a' will be stored at ch location....
Hi
How can I resize tabulations in vim?
You have defined function CheChar to return a char. When you call CheChar from main the value returned by CheChar is discarded. You probably want to save that value in c.input.
I am not sure whether this is what you need ...
#include <stdio.h>
int main (void)
{
char *str = "123456789";
int num;