18,490 Topics

Member Avatar for
Member Avatar for n.aggel

I wish a happy 2008 to everyone on this forum. I just obtained the practise of programming{by the way it seems like a great book...} and i have the following code for linked list: [CODE=c] #include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct Nameval { char *name; int value; struct …

Member Avatar for n.aggel
0
121
Member Avatar for dv1r

im trying to make a function that will fill an array with numbers but something seems to be wrong =\ its suppose to be cards.... sorry if my spelling is bad :P [code] #include<stdio.h> #include<conio.h> #include<stdlib.h> typedef struct{ int num,sute,joker,in_use,arr_place; } card; void set_deck(deck[]) { clrscr(); int i=0,j=0,counter=0; for(j=1;j<=4;j++) for(i=1;i<=13;i++) …

Member Avatar for Narue
0
198
Member Avatar for Hawesch

Hello, I'm new to this and trying to understand how I should code this. I'm looking to be able to write a code where I have the string "test_this_" I'm looking to beable to add the date and time in secs at the end of the statement. Can someone help …

Member Avatar for Narue
0
102
Member Avatar for Acidburn

Hello there, is there a way to convert a char[2] = '1', '2' kinda thing to an int ?

Member Avatar for Narue
0
142
Member Avatar for badboy20008

hi I just want 2 know how you can display the first word from a list of words from a text file you have to see that word then it dissapears and you have to type that word than you go to the second word, it shows the word after …

Member Avatar for Ancient Dragon
0
101
Member Avatar for mana

I have written a calculater that gets an expression from the user and change it to polish form and then calculates the result it can calculate cos,sin,tan cot,+,-,*,/ the first part is very similar to a program i saw in web(function ReversePolish) it must be able to get () . …

Member Avatar for Duoas
0
213
Member Avatar for Acidburn

whats wrong with the following code?? [code] int j[100] = {0}; int i = 0; for ( ; i < 10; i++ ) { puts( j[i]); } [/code] it keeps giving the warning [quote] warning: passing argument 1 of ‘puts’ makes pointer from integer without a cast [/quote] And when …

Member Avatar for Narue
0
89
Member Avatar for Sukhbir

[code=c] void main() { fork(); fork(); printf("main"); } [/code] pls explain me what is the output. how it comes.

Member Avatar for replytoshshir
0
220
Member Avatar for sivaslieko++

I have such an loop: [code=c] int i = 1230; while(i<1300){ int k = 0; Flight removedItem = RemoveQ(&Item); if(removedItem.C_TIME <= 1230){ k = k + 1; printf("%d", removedItem.C_TIME); } i = i + 5; printf("%d", removedItem.C_TIME); [COLOR="Red"]// it prints correct values here[/COLOR] } [/code] Why the if statement does …

Member Avatar for dubeyprateek
0
227
Member Avatar for cdijuste

Please note that I understand that this topic is old and was written in 2004. I am having a similar issue with a few codes that I have written from a book's tutorial. The program has worked with an older compiler; I am currently using Visual Studio 2005 writting a …

Member Avatar for dubeyprateek
0
128
Member Avatar for carlarolan

hello i want to know on how to make a code, for example you are on page 3 you want to go to the page 2 by clicking indicated buton..and also i want to have some example on how to make a graphics like a map using initgraph..thanz..

Member Avatar for dubeyprateek
0
79
Member Avatar for PSCHMurthy

Hello, can anyone help me in writing the 8051 C program using keil.I mean which predefines are imported(i.e like #include<stdio.h> in C language). Thanks for your help. Regards, PSCHMurthy

Member Avatar for Duoas
0
38
Member Avatar for emilio

hi i'm trying to write program to create a mirror print of a binary tree the code is : [CODE]typedef struct Node { int info ; struct Node *left , *right ; } Node ; void swapNode ( Node *n1 , Node *n2 ) { Node *tmp = NULL ; …

Member Avatar for emilio
0
109
Member Avatar for Karkaroff

i posted this problem in C++ forum and people told me its impossible. I'm using a very old version of C++ and most of its features are very similar to C. So i thought maybe you people will understand what the problem is.... In the following code, getch() is executed …

Member Avatar for Narue
0
88
Member Avatar for Archimag

Ale Hallan people.. I have something like this: [CODE]void main(){ int flag=1,exit=1; cla_N *head=NULL; char class_name[NAME_LENGTH],choice[1]; double diversity; while (exit) { printf("Please choose one of the options below:\n" "1- Create/update class. \n" "2- Delete class. \n" "3- Insert new species. \n" "4- Delete species. \n" "5- Update species. \n" "6- …

Member Avatar for n.aggel
0
142
Member Avatar for guy40az

I am a new to linux and the gcc system I was just wondering if someone could answer a couple of questions about the including hearder files like the math.h file. I was making a simple program and using some math trig functions. I keep getting the error cosf undefined …

Member Avatar for Salem
0
186
Member Avatar for pdwivedi

[COLOR="Green"]i want to take data from serial port and want to redirect it to the ps/2(keyboard) port. is it possible to do so if yes please help. [/COLOR]

Member Avatar for Ancient Dragon
0
205
Member Avatar for pavitragupta

like i have a string ch[100] how can i convert each character of it to integer that is ascii value which can be later converted in to binary so that ascii value of each character in a string has a corresponding binary value

Member Avatar for Jishnu
0
154
Member Avatar for kv79

HI, can anyone write me some about decompile for C/C++.Is it possible to decompile ( .exe).

Member Avatar for Jishnu
0
126
Member Avatar for pavitragupta

Can any body please tell me code of Simplified Data Encryption Standards in C language

Member Avatar for Salem
0
447
Member Avatar for sivaslieko++

I am writing a Queue class implementation, and my Queue holds a object called Flight. I tried to create this object by struct. Some part of my code is here: [code=c] #include <stdio.h> #include <stdlib.h> typedef struct { int C_TIME; int D_TIME; char FL_NUM; char D_CITY; }Flight; #define MAXSIZE 5 …

Member Avatar for Duoas
0
205
Member Avatar for bobei89

Please help me... after the execution of the program. It write the new information to it. However, the .txt file do not display the new information properly. (The index number stick with the name...). It is a half work program. Please help me solve this problem or else i cannot …

Member Avatar for bobei89
0
800
Member Avatar for sa-al

hello i have wrote a program that converts a statement to sth like the example below please help me: (9*(1+(3*8)))+(1+(4*5)) into: 9 1 3 8 * + * 1 4 5 * + + [code=c] while((c=getch())!='\0'){ /*i dont know whether it is true or not*/ if(c=='('){ co[k]=1; k++; break; } …

Member Avatar for invisal
0
146
Member Avatar for silent_letter

I am a new learner of C and I tried to write a program about searching a keywrod from a .txt file and counting the number of time that the keyword repeats My program is below...it can't work...and I can't understand why.... can someone please help me...T_T Thank you [CODE]#include<stdio.h> …

Member Avatar for silent_letter
0
173
Member Avatar for sara_84

[code=c++] #include <iostream> #include <string> #include <algorithm> #include <vector> #include <set> #include <map> using namespace std; class transition // an entry in 'alpha' transition_table { public: transition(string from_state, char input_symbol, string to_state) {from=from_state; input=input_symbol; to=to_state;} static bool smaller(transition a, transition b) { if(a.from<b.from) return true; else if(a.from>b.from) return false; else …

Member Avatar for hkdani
0
208
Member Avatar for pprabhakar

i want to compilation flags, how many are there give me some flag names?

Member Avatar for Salem
0
242
Member Avatar for prasath

hi, will someone point me the reasons why a call to [B]malloc [/B]fails even if we have enough memory ?

Member Avatar for dubeyprateek
0
3K
Member Avatar for jobs

I have a CProgramA that need to call CProgramB just before CProgramA terminates. How can this be achieved?

Member Avatar for Salem
0
293
Member Avatar for corneliu9d

Hello! I'm newly registered, but I have taken a look here before. More precisely, [URL="http://www.daniweb.com/forums/thread73544.html"]here[/URL], a thread which helped me a lot, as I were a total beginner in working with MIDI. My problem is that, though I don't get any errors, I don't hear any sound. The funny thing …

Member Avatar for corneliu9d
0
205
Member Avatar for kv79

Hi, I never enter a PHP or html or any other language for web design . I want to use C/C++ with web designs or what ever,so what i need to download for making a webs.? I want that software be free if it possible.

Member Avatar for kv79
0
112
Member Avatar for AbberLine

For this question I would like to reffer to my previous thread: about my game project for school: [URL="http://www.daniweb.com/forums/thread102003.html"]http://www.daniweb.com/forums/thread102003.html[/URL]. I would like to execute a function every few miliseconds. Say every 5 miliseconds. [QUOTE=invisal;495957] This part should call every 5 miliseconds. [code=cplusplus] bool Render() { // Render all the 20 …

Member Avatar for AbberLine
0
2K
Member Avatar for AbberLine

Hi This question gives me a weird feeling, actually I'm not really sure if this is relevant. Anyway, here we go: I'm (still) busy coding my first game in C. The goal is simple: the player is a fisherman and needs to catch all the fish in the water. If …

Member Avatar for AbberLine
0
416
Member Avatar for arunpawar

is there any tutorial for creating simple windows programs which explains easy step by step . i'm looking for tutorial to create windows programs using this.

Member Avatar for Ancient Dragon
0
65
Member Avatar for carobee

hi, i wanted some help in File handling in C. consider i have one File like a.txt a.txt [Marks] Physics = 60 Chemistry = 80 ;Prac(25) Maths = 98 [Grade] Neatness = B Attention = A ;A+(9.5) Now suppose i have to insert new values in this file for the …

Member Avatar for ssharish2005
0
156
Member Avatar for kv79

Hi , I am trying to find some solution about this i try on different tutorial but with no succes. I have no idea what the author want to told me. Here the tutorial [url]http://lib.daemon.am/Books/C/[/url] pick day15 go to Linked list ,and if you know other tutorial who write about …

Member Avatar for Narue
0
94
Member Avatar for sa-al

hello i have a question .how can i write a program that gets a statement from user & prints the result sth like below: 2*3+sin(1-cos(0)) please help me

Member Avatar for ssharish2005
0
110
Member Avatar for n.aggel

hi guys, i have the following code: main.c [CODE=c] #include <unistd.h> #include <stdio.h> #include <errno.h> #include <limits.h> //defines PATH_MAX #define _GNU_SOURCE #ifndef PATH_MAX #define PATH_MAX 255 #endif int main(void) { char mycwd[PATH_MAX]; fprintf(stderr, "\nThe PATH_MAX is %d\n", PATH_MAX); if (getcwd(mycwd, PATH_MAX) == NULL) { perror("Failed to get current working directory"); …

Member Avatar for ssharish2005
0
666
Member Avatar for zawpai

Hi , Could you please give me some suggestions? I would like to create a small buffer in my code because the memory of the hardware is quite small. If so, it can't receive all of the data that I send. Sometimes, the data are over write. How should I …

Member Avatar for ssharish2005
0
140
Member Avatar for jobs

strcpy(buf, "my_id_%d_",i) strcpy(buf1, "my_com_id_%d", j) First I want to place value of i into "my_id_1" like so and copy to buf. And do the same thing in second line the code. Now I want to join both buf and buf1 so it will give me a new string "my_id_1_my_com_id_2". How …

Member Avatar for ssharish2005
0
144
Member Avatar for n.aggel

hi, i am reading the book "Operating Systems Design and Implementation 3rd edition" which analyzes the minix source code... in the part of filesystems we see this code [CODE=c]PUBLIC _PROTOTYPE (int (*call_vec[]), (void) ) = { no_sys, /* 0 = unused */ do_exit, /* 1 = exit */ do_fork, /* …

Member Avatar for n.aggel
0
131
Member Avatar for Jishnu

Hello, I know this much that I want to include two files in my program. But can I decide which files to include at run time? Is this possible? Thanks in advance, -Jishnu.

Member Avatar for Jishnu
0
386
Member Avatar for Queatrix

I have been a C/C++ programmer for 4 years now, and now that I'm actually reading a tut on it, I have to say, I am impressed! The whole concept of the DS really is cool; and it's flexability is the best I have seen. While I was reading one …

Member Avatar for Duoas
0
105
Member Avatar for jobs

I am getting an error when I do this in C program: execl("/bin/cp","../data/data_.txt","../data/data.txt",0); error is as follows: ../data/data_.txt: missing destination file operand after `../data/data.txt' Try `../data/data_.txt --help' for more information. I tried this too, it didn't help. execl("/bin/cp ../data/data_.txt ../data/data.txt",0); All I am trying to do is this: cp ../data/data_.txt …

Member Avatar for kv79
0
689
Member Avatar for kv79

How to make win32 app with login? Is there some command or i need to make my function by myself?

Member Avatar for dubeyprateek
0
109
Member Avatar for daino

Hi I'm wondering why you would learn C++ for use in finance when you can do so many calculations on an excel spreadsheet and use VBA. I am not an expert on either though could someone tell me why C++ is better and if not why excel and VBA is …

Member Avatar for dubeyprateek
0
251
Member Avatar for jobs

int file file = open("./some.txt", O_RDONLY); Above line file=open giving me compile error: 'O_RDONLY' undeclared (first use in this function) What is the problem here? I am running linux and gcc 4.1.

Member Avatar for jobs
0
3K
Member Avatar for death_oclock

If I call the MessageBox function: [CODE]MessageBox(NULL, "Message", "Message", MB_OK);[/CODE] for example, the box will not appear. It will make the beeping sound, though.

Member Avatar for death_oclock
0
129
Member Avatar for kv79

Hi , [code=C] /* Inputs a list of strings from the keyboard, sorts them */ /* in ascending or descending order, and then displays them */ /* on the screen. */ #include <stdlib.h> #include <stdio.h> #include <string.h> #define MAXLINES 25 int get_lines(char *lines[]); void sort(char *p[], int n, int sort_type); …

Member Avatar for kv79
0
95
Member Avatar for kv79

Hi i always mix up a NULL and '\0' and 0. Can you write me when to use these things?

Member Avatar for kv79
0
223
Member Avatar for Queatrix

How would I execute a C/C++ program without using a windows library? (Like ShellExecute)

Member Avatar for Queatrix
0
171

The End.