Forum: C Sep 27th, 2009 |
| Replies: 3 Views: 222 Doing what you suggested (putting cd and make in seperate lines) will execute "make" in the current directory (basicaly, cd only effects the line it's in) |
Forum: C Sep 27th, 2009 |
| Replies: 3 Views: 222 Hello guys, I'm trying to make this work
all: daemon client
daemon:
cd ./daemon; make daemon
client:
echo going in
cd ./client; make client
clean: |
Forum: C Aug 17th, 2009 |
| Replies: 6 Views: 1,127 Better late than never. Many thanks, this problem cost me a good grade last year :) |
Forum: Networking Hardware Configuration Sep 30th, 2008 |
| Replies: 5 Views: 1,064 My main problem is that I'm having really strange glitches where internet access is just non-existent or really really slow, but I assume it's a problem with one of the routers, the newer one just... |
Forum: Networking Hardware Configuration Sep 28th, 2008 |
| Replies: 5 Views: 1,064 I was hoping I wouldn't need to buy one. Is it the only way? |
Forum: Networking Hardware Configuration Sep 26th, 2008 |
| Replies: 5 Views: 1,064 Hello, I'm trying to set up something like this:
adsl-connected router -> standalone router
| | |
Windows-XP PC Windows Vista PC Ubuntu Laptop
I'm... |
Forum: C Jul 13th, 2008 |
| Replies: 2 Views: 447 |
Forum: C Jul 13th, 2008 |
| Replies: 2 Views: 447 I am doing some self-made exercises lately to practice my C skills.
One of them is something like this:
Given a file with something like: "Peter Wilson the swordsman".
I want to store "Peter... |
Forum: C Jun 11th, 2008 |
| Replies: 1 Views: 1,091 Nevermind, decided to go with bubble sort. |
Forum: C Jun 11th, 2008 |
| Replies: 1 Views: 1,091 Hello, sorry to ask, but does anyone know any working algorithms for quicksorting a doubly linked list?
I'm only asking because I'm going to rip someone's head off if I have to keep doing it by... |
Forum: C Jun 5th, 2008 |
| Replies: 20 Views: 1,641 Thanks, your tip gave me the idea on how to fix it.
The problem is that for some reason the program got to line 35 BEFORE having enough time to print the terminal. A simple fflush(stdout) fixed it... |
Forum: C Jun 5th, 2008 |
| Replies: 20 Views: 1,641 I'm using Ubuntu 32 bit. Can you see the "You quit" Message? Upon compiling my program runs like this:
See "Something"
press q and see absolutely nothing on the terminal
press any key and enter... |
Forum: C Jun 4th, 2008 |
| Replies: 20 Views: 1,641 #include <stdio.h>
#include <ncurses.h>
void print_stuff() {
int i;
for (i=0;i<10;i++)
printf("%d ",i);
}
void do_stuff(){ |
Forum: C Jun 4th, 2008 |
| Replies: 20 Views: 1,641 Sorry about double posting but I feel this deserves it's own post.
My idea here is to use ncurses as a simple extension to regular printf'ing.
I once did a python script which only used wx(i... |
Forum: C Jun 4th, 2008 |
| Replies: 20 Views: 1,641 I've been trying to do as explained here: http://web.cs.mun.ca/~rod/ncurses/ncurses.html#leaving
It just seems to fail upon endwin(). After calling it, I can see everything I had right before... |
Forum: C Jun 3rd, 2008 |
| Replies: 20 Views: 1,641 I seem to be having an odd behavior on "closing" windows... Since I'm only really using ncurses to print and sort my list, I'm trying not to rely on it too much. It's possible to do isn't it?
... |
Forum: C Jun 3rd, 2008 |
| Replies: 20 Views: 1,641 Actually, I asked one of my teachers today and he did recommend ncurses :) I'm finding it a bit harder to use than expected but I guess I need to find a better tutorial... Thanks for all the tips... |
Forum: C Jun 2nd, 2008 |
| Replies: 20 Views: 1,641 I already expected that. But from what I've heard, there's other ways to do it... (No one seems to remember how for some reason though)
Is there any reference I can use for doing that? The... |
Forum: C Jun 2nd, 2008 |
| Replies: 20 Views: 1,641 Hi, I've been trying to analyze the source code to some applications but so far I've been unable to figure out how to receive user input while the program is of doing something else.
My program... |
Forum: C May 22nd, 2008 |
| Replies: 12 Views: 1,766 Kernighan and Richie's "The C programming language" has a a useful function for calculating powers. Although I suspect it's very similar to the one on math.h :P
In any case, just multiply a number... |
Forum: C May 22nd, 2008 |
| Replies: 6 Views: 728 The main purpose of this project is to print a list of items based on their distance to the user's position. To make it easier to locate a particular item I was hoping for easy ways to add/remove... |
Forum: C May 22nd, 2008 |
| Replies: 6 Views: 728 In this case, all I'm missing is a basic sorting mechanism AND the user interface :) They also happen to be very closely linked together. |
Forum: C May 21st, 2008 |
| Replies: 6 Views: 728 I'm doing a project for college. It's not too complicated but it involves a lot of data access on a linked list. Does anyone have any tips for designing an intuitive command line gui? I'm doing... |
Forum: C Apr 26th, 2008 |
| Replies: 11 Views: 1,433 A quick google search found me a solution:
http://bytes.com/forum/thread533296.html
thanks for directing me in the right way :) |
Forum: C Apr 26th, 2008 |
| Replies: 11 Views: 1,433 Wouldn't fflush(stdin) solve it though? Is there a way I can clear it if that doesn't work? |
Forum: C Apr 26th, 2008 |
| Replies: 11 Views: 1,433 I'm not using it anywhere. |
Forum: C Apr 26th, 2008 |
| Replies: 11 Views: 1,433 Dammit, i hate it when this happens |
Forum: C Apr 26th, 2008 |
| Replies: 11 Views: 1,433 I don't see how that would help. |
Forum: C Apr 26th, 2008 |
| Replies: 11 Views: 1,433 This was part of a triple post |
Forum: C Apr 26th, 2008 |
| Replies: 11 Views: 1,433 Basicaly I'm trying to do this
int create_student(student_data *student){
printf("Nome do aluno:\n");
fgets(student->name,name_limit,stdin); //wtf?
printf("NĂºmero do aluno\n");... |
Forum: C Mar 24th, 2008 |
| Replies: 6 Views: 1,127 I know, that's why I said modified for windows. As in replacing inb and outb with inportb and outportb. |
Forum: C Mar 24th, 2008 |
| Replies: 6 Views: 1,127 Damn... My XP machine is also running the same program (modified for windows, obviously) kinda funky... And there's no way I'm getting Vista back on my laptop :P |
Forum: C Mar 23rd, 2008 |
| Replies: 1 Views: 1,883 No offense but isn't it all very ambitious on your part? If you're really feeling up to it I'd suggest looking at the original source code. |
Forum: C Mar 23rd, 2008 |
| Replies: 6 Views: 1,127 Does anyone here have any tips on using inb and outb for interacting with hardware on a Linux system? iopl(2) and inb(0x61) don't seem to work very nicely... Infact, inb(0x61) gives me a segfault.
... |
Forum: C Mar 21st, 2008 |
| Replies: 6 Views: 751 D'oh. Thanks :P C is so different from any other language I've learned so far... I keep missing small details like the F in printf and terminating lines with ";". I'm really glad to have found this... |
Forum: C Mar 21st, 2008 |
| Replies: 6 Views: 751 What do you know, it really does. I wonder what happened earlier... :S
Thank you, both :) Does anyone know the right method to terminate a string by the way?
if (x==strlen(a))... |
Forum: C Mar 21st, 2008 |
| Replies: 6 Views: 751 Basicaly I want to see if a a number (in my example: 12345678910 ) contains another, smaller number (1234). For this I decided to turn a into a string. For some reason my "in" function never worked.... |
Forum: C Mar 13th, 2008 |
| Replies: 12 Views: 1,953 Thanks for everything guys! It turns out my friend's program was also faulty, it just escaped both him and the teacher :P This exercise turned out to be way more interesting than expected :) |
Forum: C Mar 12th, 2008 |
| Replies: 12 Views: 1,953 Oh, I thought C worked in complements of 2 for some reason... as in 00000 = 0 and 11111 = -1, etc...
By the way, is there a way to increase the limit so we can use it for number larger than 20! ?... |
Forum: C Mar 12th, 2008 |
| Replies: 12 Views: 1,953 I've been thinking... Shouldn't unsigned double the amount of numbers I can use?
For example: Long makes me able to represent numbers between -2^63 and (2^63)-1. Since unsigned means I no longer... |