15,551 Topics

Member Avatar for
Member Avatar for Abhishek Joshi

I know that the programming style is bad/functions NOT being used are terrible... But I cannot escape my professor's methods... Ok. So this program is meant to read a text file containing: Have a good day then we pick a pick a word, and change it, and output it to …

Member Avatar for L7Sqr
0
106
Member Avatar for asa88

Ok, so my task is to Write a simple TCP client that fetches pages from web servers.The client should be invoked with the command (for example) >> webclient [url]www.yahoo.com/[/url] >> webclient [url]www.msstate.edu/academics/[/url] • The client should get the response from the HTTP server and print it on the screen. Here …

Member Avatar for nezachem
0
720
Member Avatar for xeniter

Has anyone tried to compile the LWIP with a c++ compiler? TCPIP/os/system/lwip/core/memp.c /TCPIP/os/system/lwip/core/pbuf.h:37, from /TCPIP/os/system/lwip/core/memp_std.h:1, from /TCPIP/os/system/lwip/core/memp.h:45, from /TCPIP/os/system/lwip/core/memp.c:43: /TCPIP/os/system/lwip/core/err.h:41: error: expected identifier before ‘extern’ /TCPIP/os/system/lwip/core/err.h:41: error: expected `}' before ‘extern’ The compilter (g++) serachs the } from enum in the include files. Has anyone a idea what i must …

0
53
Member Avatar for silentassasin

Hi, I wrote a program for detecting circles using Hough Transform using OpenCV in C. The program inputs 3 images, each image contains a fixed small circle and a big circle with variable position. The program then recognizes both the circles and marks the centres of both the circles. Now …

0
184
Member Avatar for yongj

So I'm trying to code a program where it produces a directory listing of all files matching a specified file name pattern. I have compiled a code that is somewhat similar (But still functions differently) than the code I want; my code just lists the directory with full parameters. How …

Member Avatar for Ancient Dragon
0
156
Member Avatar for tkdlady

I have the following code in some source I am looking at but I have never seen it before. Can someone tell me what it means? The code snippet is below: [CODE] [B]#define SET_EXPIRE(sa, delta, exp){[/B] [B]if[/B](((sa)->ipsa_ [B]## delta) != 0){[/B] (sa)->ipsa_ [B]## exp = sadb_add_time((sa)->ipsa_addtime,[/B] (sa)->ipsa_ [B]## delta);[/B] [/CODE] …

Member Avatar for tkdlady
0
170
Member Avatar for CoilFyzx

I am doing a personal project to get to know C a little better: Some essential information - I have a usb printer - I am using Windows 7 OS..suggest better Os..haha..not NT or ms-dos ;) - I am using Visual C++ 2008 Express edition..coding strictly in C however(You can …

Member Avatar for Ancient Dragon
0
599
Member Avatar for charchar88

Ok, I'm using gcc in ubuntu to compile. Below is a boggle solver that basically loads a dictionary.txt file and then you would input a 5x5 grid of letters like below into the letter[][] array a b c d e f g h i j k l m n o …

Member Avatar for WaltP
0
146
Member Avatar for gruffy321

hi all , can i access the parallel port using c`s assembly language syntax and using windows 98 se as the os or xp if i could (dont think xp is possible though, i dunno?) AOAP Thanks for reading , gruffy bw , if is possible can i get direction …

Member Avatar for gruffy321
0
507
Member Avatar for jrp370

i have a few .c files, pro3.c is the only file that complies without a problem however when i go to compile the other ones i get a error message: warning useless storage class specifier in empty declaration, i was hoping someone could tell/show me what i am doing wrong. …

Member Avatar for Narue
0
469
Member Avatar for _avishek

Hello, world! This is my first post on DaniWeb, though I have frequented it quite often. I'm using gcc and make (on Ubuntu 10.10) with GVim for creating a foundation library in C. Within my code I've built in rudimentary profiling and assertion policies that are enabled through a symbolic …

Member Avatar for _avishek
0
590
Member Avatar for alex1050

[CODE]I'm having trouble calculating the right interest expense. The solution for interest expense is 2294.48 but cant get it. #include <stdio.h> #include <stdlib.h> #include <math.h> int main () { double P,R,Y,M,X,A,MP,T,I; printf("Enter the Principle:\n"); scanf("%lf",&P); printf("Enter the Rate:\n"); scanf("%lf",&R); printf("Enter the Years:\n"); scanf("%lf",&Y); R = R/1200; M = Y * …

Member Avatar for kings_mitra
0
122
Member Avatar for wildplace

how do i move the value of %eax to the memory location of %0 [CODE] int size 10; long *list = (long*) malloc(size*sizeof(long)); asm( movl $999, %%eax movl %eax, (%0) // this is what im trying, how do i fix it? :"=r"(list) :"0"(list), "a"(strLen) );[/CODE]

Member Avatar for wildplace
0
119
Member Avatar for dimmu1

i have this function for dealing cards in card game. it is working fine, but i cant figure out how to pass a variable in it. Here is what i mean: This function will deal 5 card. but the user should have the option to change 1 or multiple cards …

Member Avatar for WaltP
0
113
Member Avatar for dimmu1

ok.. so im trying to make a function to find a par of cards with the same suit value for a game of 5 card poker. Here is what i have so far: my main: [CODE] int main (void) { /* initialize suit array */ const char *suit[4] = {"Hearts", …

Member Avatar for dimmu1
0
134
Member Avatar for rockerjhr

main.c [CODE]#include "stack.h" #include "stack_interface.h" #include "lex.h" #include <stdio.h> #include <stdlib.h> #define PUSH(s,c) if(push_char(s,c) == ERROR){ printf("Fatal error in pushing symbol on stack.\n") ; exit(1) ; } #define POP(s,c) if(pop_char(s,c) == ERROR){ printf("Fatal error in poping symbol off stack.\n") ; exit(1) ; } #define TOP(s,c) if(top_char(s,c) == ERROR){ printf("Fatal error …

Member Avatar for Narue
0
253
Member Avatar for cse.avinash

Hello Sir, I have an assignment to do, my question is:-- Given the set of integers, find the sum of all positive integers in it. [B][U]Input[/U][/B] t – number of test cases [t < 1000] On each of next t lines given a integer N [-1000 <= N <= 1000] …

Member Avatar for cse.avinash
-1
547
Member Avatar for sisakhti

hi I need a C function to return a value to getch() until don't press a key .Please help me

Member Avatar for CoilFyzx
0
47
Member Avatar for alex1050

Suppose you want to develop a program to play lottery. The program randomly generates a Lottery of a two-digit number, prompts the user to enter a two-digit number, and determines whether the user wins according to the following rule: If the user matches the lottery in exact order , the …

Member Avatar for CoilFyzx
0
870
Member Avatar for p.user01

[CODE] I am a novice programmer and need help..... #include <stdio.h> int main (void) } int n1=2; int n2=0; n2= (++n1) + (++n1); printf("Result= %d",n2); return 0; } Result= 8 How is this possible?? Similarly, #include <stdio.h> int main (void) } int n1=2; int n2=0; n2= (++n1) + (++n1) + …

Member Avatar for WaltP
0
307
Member Avatar for raigs

[CODE]myuser@linux:~/Desktop$ gcc -nostdlib -Wl,-dynamic-linker,/home/myuser/Desktop/ld-linux-x86-64.so.2,-rpath,/home/myuser/Desktop libc.so.6 libgcc_s.so.1 simple.c myuser@linux:~/Desktop$ ldd a.out linux-vdso.so.1 => (0x00007fffbf5ff000) libc.so.6 => /home/myuser/Desktop/libc.so.6 (0x00007f308b7ae000) libgcc_s.so.1 => /home/myuser/Desktop/libgcc_s.so.1 (0x00007f308b598000) /home/myuser/Desktop/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x00007f308bb11000) myuser@linux:~/Desktop$ [/CODE] Which ld is being used, the one on the Desktop or the one in /lib64 ? What options do I have to use …

0
108
Member Avatar for alwaz on9

Hi all, I was asked to write a shell program in c in unix....basically what i would like to include are the use of dup2 to implement redirection ( < or >) and the use of dup2() and the pipe() system call to implement the '|' symbol on the command …

0
165
Member Avatar for jithuvsjithu

Hello firends , i am new here.. am interested in programming languages... here am sharing some useful graphics codes [B]1.solar system using C[/B] [CODE] #include<stdio.h> #include<graphics.h> #include<conio.h> #include<math.h> #include<stdlib.h> void main() { int gd=DETECT,gm; float i=0,j=100,me=75,ve=23,ma=105,ju=175,sa=10,ur=300,ne=200,pl=175,s=0; int x,y,k,si,sx=random(300),sy=random(400),X,Y,ss; unsigned int earth,moon,mercury,venus,mars,jupiter,saturn,uranus,neptune,pluto,sunsize; void *ear,*moo,*mer,*ven,*mar,*jup,*sat,*ura,*nep,*plu,*sun,*ships,*ships2; x=300; y=210; initgraph(&gd,&gm,"d:\\tc\\bgi"); setfillstyle(1,10); setcolor(2); fillellipse(50,50,13,13); earth=imagesize(35,35,65,65); …

Member Avatar for Soubhik
-1
179
Member Avatar for chester1908

Hello all,quick question. I have to (not my option,has to be that way) make an array with huge length, definitely more than 100.000 ,maybe 1 million. But if i use a non-integer position counter (don't know the english word for it, like myArray[i] and i is not integer) i get …

Member Avatar for chester1908
0
149
Member Avatar for ErickN

I have a file with 190 lines, that goes something like this: [QUOTE]Antigua,English,Local dialects Bahamas,English,Creole Barbados,English Belize,English,Spanish,Mayan,Carib Canada,English,French Costa Rica,Spanish,English Cuba,Spanish [/QUOTE] First field is the country, following fields are the different languages spoken in that country. Since some countries have more languages than others, I am stuck trying to …

Member Avatar for ErickN
0
958
Member Avatar for mastertoilet

We have to write a program to convert a user entered Kelvin temperature to either celsius or fahrenheit and also display the state of the water. I found the same question on here and used it to fix some problems I was having, but I still can't compile and I …

Member Avatar for tomato.pgn
0
2K
Member Avatar for charchar88

I'm trying to get a C version of this game working on my computer using gcc on ubuntu. [url]http://www.lemoda.net/c/boggle/boggle.html[/url] I have no need for a pearl script or anything since I just have a simple dictionary text file and want to be able to just load in the text file …

Member Avatar for TrustyTony
0
369
Member Avatar for deeer

Hello, I have a question regarding reading a txt file and then putting the info in a link list. the problem is that the file contains 3 things to read a letter, a username and a password in the below format: S P2-output1.txt A Hanna hdfjuju first i must read …

Member Avatar for Ancient Dragon
0
120
Member Avatar for Sourish90

Dear Frnz, I am new to this community.....I wanted help from you guys... I want to clear as well as strenghthen my concepts of data structures...I am planning to implement them in C.....I am follwing [B]Tanenbaum[/B]...but i am not completely satisfied with it..... Can you guys suggest which can be …

Member Avatar for tomato.pgn
0
237
Member Avatar for c++lover

hi to all, i want to know how to compiler tsr programme using the borlandc v3.1 compiler anyone know plz guide me what is the command to compile and moreover what are the runtime directories that are we set for tsr programe or generating for .com file i will be …

Member Avatar for chrjs
-1
174

The End.