15,551 Topics

Member Avatar for
Member Avatar for yuri1969

Hi, I have prolly very noobish question. I compile my program separately with GCC by: [CODE]gcc -O2 -Wall -c foo.c[/CODE] I just wat to ask if there is a chance to specify the output destination of [B]foo.o[/B] file. Now the output is forwarded to the makefile dir. Thank you for …

Member Avatar for yuri1969
0
2K
Member Avatar for moroccanplaya

when the user types in ls i want the program to show the listed files in his directory but it is not working i cant list the files can anyone help ? this is what i have done so far. it breaks fine when the user enters x [CODE] while(1) …

Member Avatar for Shankye
0
143
Member Avatar for shinsengumi

Hello all. I'm trying to compile a socket program in DevC++ but everytime I do it I get a lot of linker errors like these: [CODE] [Linker error] undefined reference to `WSAStartup@8' [Linker error] undefined reference to `htons@4' [Linker error] undefined reference to `inet_pton' [Linker error] undefined reference to `socket@12' …

Member Avatar for shinsengumi
0
880
Member Avatar for frankchester

I've found how to convert a char to its ascii value (toascii) but I want to do it the other way round! I'm aware you can use putchar() but that doesn't really work so well for what I'm doing, or at least I'd like to find a quicker way if …

Member Avatar for bambrah jai
0
158
Member Avatar for mrccus10

Please help me convert this pseudo codes to C Program. In parallel, every processor executes the following loop: LOOP: LOAD REG[1] MEM[V] Load the value of previous time step from MEM[V] MOVE RN REG[1] ROUTE RN Send to the North MOVE REG[2] ROUTE Save value from the south MOVE RE …

0
44
Member Avatar for TGeorge824

Hey everyone, I was assigned a project where we have to simulate virtual memory page replacement algorithms. I decided to use a Queue ADT I made in a previous project, and modify it to enqueue page reference strings of a process, character by character. However, when I initially create the …

Member Avatar for gerard4143
0
845
Member Avatar for r@o

How to add two equations in c... I was given a hint i.e. to use sscanf and printf......

Member Avatar for ravenous
0
74
Member Avatar for rate

[code] unsigned int crc8(unsigned char *message) { int i, j; unsigned int byte, crc, mask; i = 0; crc = 0xFF; while (message[i] != 0) { byte = message[i]; crc = crc ^ byte; for (j = 7; j >= 0; j--) { mask = -(crc & 1); crc = …

0
53
Member Avatar for ak47kumar1

hey guys, I am a beginner and am having trouble loading data from an external data file and then loading it to the screen. It is supposed to be the temperatures from everyday for a year for 2 years. 1 column is 1930 the other 2000 This is my script, …

Member Avatar for ravenous
0
111
Member Avatar for yuri1969

Howdy, I need to print given path to a file. The problem is that my app is platform independent -> I can get a Win32 style path: [CODE]C:\foo\bar.dat[/CODE]. The problem is with printing single backslashes '' -> single char converts to "\char" style. I need to convert it somehow to …

Member Avatar for yuri1969
0
155
Member Avatar for gouzou

Hi to everyone! Does anybody know how to fix this issue? When i run the exe file in my pc, the non english characters (in my case greek) that are stored inside c code aren't displayed on the screen. (compiler=Visual Studio)

Member Avatar for Ancient Dragon
-1
79
Member Avatar for vedro-compota

Hi guys) Please tell me - why is it impossible to keep global variables in C in a processor register? thanks in advance)

Member Avatar for vedro-compota
0
158
Member Avatar for tastyTreeHUGGER

I am basically done with this program, but now my only problem sorting the students GPA from lowest to highest. this is the .dat file (its the ways its suppose to look like when printed out): ANNA A ADAMS 11 A STREET ALLENTOWN PA 11111 11 5.50 BOB B BRADBURY …

Member Avatar for Adak
0
424
Member Avatar for TrueCoding

Im not sure what Ive done wrong but I'm trying to display my array but the program keeps ending so I cant see if its actually working. Im sure its a little mistake - Any help or suggestions will be appreciated. [CODE] # include <stdio.h> # define MAX 100 int …

Member Avatar for Adak
0
106
Member Avatar for moroccanplaya

i cant break out of this loop its driving me crazzy!! [CODE] while (1) { printf("please type in the path for the file you want to archive\n"); scanf("%s",&original_file); open_pointer = fopen( original_file, "rb"); original_pointer = fopen(original_file,"rb"); copy_pointer = fopen( archive_name,"ab"); if (copy_pointer NULL) { printf("\n copied successfull"); puts("\nenter x to …

Member Avatar for moroccanplaya
0
154
Member Avatar for shinsengumi

Hi everyone! I'm transferring my C program that I created from Linux to WindowsXP. I would like to know what I need to download/install in Windows in order to compile and successfully run the program? Also, will I need to change some parts of the source code? I used socket …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for CanofCornInfini

Hello, I am new to C and not really sure how to do this. This program extracts and prints the rightmost digit of the integer portion of a float, and I need to convert it but I'm not sure how. [CODE]#include <stdio.h> void main (void) { float num; int rightdigit; …

Member Avatar for Shankye
0
152
Member Avatar for kapilsolanki84

i am using devc++ compiler. using c code created the window but its blank . now to write data something on it. like (say)write(create) the output of my own program into that window.in c. guide me pl.[CODE]. in this i have not inserted my own code. this code is used …

Member Avatar for WolfPack
0
212
Member Avatar for dspjm

What's wrong with the program? It went wrong when i print the numbers in the lists. After i prints the last number, it didn't stop, and the program went into wrong memory. Eager for your answer: [CODE] #include <stdio.h> #include <malloc.h> #define NULL 0 typedef int ELEMNT_TYPE; typedef struct node …

Member Avatar for ckoy
0
124
Member Avatar for hadoque

Hi I'm trying to extract the exponent and mantissa from a float. It seems that the most forward way would be to read the bits of the number, according to IEEE 754 ([url]http://steve.hollasch.net/cgindex/coding/ieeefloat.html[/url]). So I need to do bitwise operations to float variable. According to what I have found on …

Member Avatar for hadoque
0
166
Member Avatar for mahinirak

Hi guys, I am coding the solution to K & R 2nd edition. I compare my solutions with the C answer book. Sometimes i feel my code is shorter but whether it is better and whether it confirms to good coding standards is what i am worried about. So i …

0
78
Member Avatar for shinsengumi

Hello all. I created a C program that used MySQL in Linux and now I'm transferring the program to Windows. I would like to ask what software do I need to download/install in Windows to be able to compile and run the program there? Also, when the program is already …

Member Avatar for shinsengumi
0
156
Member Avatar for tomtetlaw

When I run my program, I get this runtime error: [code] Windows has triggered a breakpoint in quarantine.exe. This may be due to a corruption of the heap, which indicates a bug in quarantine.exe or any of the DLLs it has loaded. This may also be due to the user …

Member Avatar for tomtetlaw
0
209
Member Avatar for tanzi816

I'm trying to write a program that can win a Battleship game in fewer than 60 guesses. Since the Battleship game that I am writing this for uses a 10x10 array, I thought that first of all I would just try to win the game in 100 guesses before I …

Member Avatar for vinitmittal2008
0
234
Member Avatar for TrueCoding

Hi I need to have an array in my program that is defined by the user. I just need the user to enter the size of the array and then enter the integer values that they want to store in the array. I know how to declare the array myself, …

Member Avatar for vinitmittal2008
0
488
Member Avatar for chi18

Hi Can anyone Help me for the program in C Using Looping Statement Create A program That Input A number And Then Convert It in Asterisk using looping statement..eg input number 5 and the output is the 5 asterisk(*****)..help me plss...:icon_smile:

Member Avatar for chi18
0
81
Member Avatar for atoklas

I am trying to read in names and telephone numbers from a text file using fscanf. The format of the data is: 9073234 Colwer, Mrs J. 3823823 Le Boeuf, Mr S. To do this I am using the following line: fscanf(fpp,"%d %s %[^\n]s",&a,surnames[i],firstnames[i]); This works except for "Le Boeuf" where …

Member Avatar for milkz
0
206
Member Avatar for rockerjhr

how do i make a program that calculates the product of two vectors in C ? this is what i have but i think im doing it wrong i need some help? [CODE]#include <stdio.h> double inner(double m[ ] , double n[ ] , int size ) ; int main( int …

Member Avatar for Dervish1
0
242
Member Avatar for amari ♥

i need help with the following: make a program that gets the summation of a given number e.g. 4+3+2+1 implement it using both iteration and recursion ex. enter a positive number: 4 the sum is 10.

Member Avatar for Shankye
0
164
Member Avatar for degamer106

Hmm I was lookin through a recursion program in this book i have here and the only thing I'm having trouble with is the modulus operator. I know that it returns the remainder of 2 numbers. But, suppose I have this: x % y If x > y then the …

Member Avatar for Shankye
-1
245

The End.