15,552 Topics

Member Avatar for
Member Avatar for xyster

Hello all, I have been a member here for some time, i must admit this is my first post. I have read the posting rules, lets hope my title is considered "meaningful". i have no code snippet, yet. I have just hit a sudden wall in my heap programming. I …

Member Avatar for xyster
0
97
Member Avatar for qurat

[B][COLOR=navy]hi my name is qurat .. i have a small problem :rolleyes: i dunno how to do this program .. i have tried it several timez but it is giving some or the other error[/COLOR][/B] [B][COLOR=#000080]here it is:[/COLOR][/B] [B][COLOR=#000080][/COLOR][/B] [COLOR=#000000]Implement a Queue using two Stacks (implement Stack using link list).[/COLOR] …

Member Avatar for Prabakar
0
83
Member Avatar for RyanLeaf

Hello, I am currently learning (or really just begun) Assembly (my first programming language, by the way) and am wondering once I become somewhat good at Assembly, should I start picking up the C language. I know that several languages are based upon it, and I am even planning on …

Member Avatar for Colin Mac
0
354
Member Avatar for nagaa

Hi, I want to do the following steps one by one 1. check whether given file is exists in the directory or not 2. if exists open the file 3.read the first line and store the values 4. got to the last line of file and store the values 5. …

Member Avatar for Clockowl
0
75
Member Avatar for satanix

hello i have got little problem :) create a c program which starts with 3 processes the first proccess generates 50 random numbers and writes them inti common memory. the second proccess reads them and whrites the even numbers in file A,the odd numbers in file B. [CODE]#include <stdlib.h> #include …

Member Avatar for satanix
0
102
Member Avatar for twgood

I am wondering about this if I had a program that contained this: if (0 <= X and X < 49) output "you fail" What will be printed if the input is 0? would it say you fail? I was thinking it was worded wrong and it should read:if (0 …

Member Avatar for twgood
0
66
Member Avatar for harsh2327

I want to read files and folder names from directories. I have used the following code. But the problem is that in the output the file name gets truncated.[I](See the output below)[/I] [code=C++] #include <dirent.h> #include <stdio.h> #include<conio.h> void main(void) { clrscr(); DIR *d; struct dirent *dir; d = opendir("."); …

Member Avatar for harsh2327
2
294
Member Avatar for knapshots

To whoever is using the following code for timing code execution in C Originally Posted by [[B]B]vijayan121 [/B][/B] [code=c] #include<time.h> blah blah main() { clock_t start, end; double cpu_time_used; start = clock(); /* whatever */ end = clock(); cpu_time_used = ((double) (end - start)) / CLOCKS_PER_SEC; } [/code] if you …

Member Avatar for Ancient Dragon
0
74
Member Avatar for wam2

I have written a code for maximum power point tracking. The purpose was to create DLL file and use it in a circuit base simulation program. I used Microsoft visual c++ 2008 express and created that DLL file but I only get first value from the created array in C. …

Member Avatar for wam2
0
372
Member Avatar for awoc

when i print out a big answers 13100000000000000 i wanted to say 13.1e12 this should happen to all different answers that come out

Member Avatar for jephthah
0
84
Member Avatar for Clockowl

Hai guys, I have quite a large program here that I don't seem to understand. The program, Bow Vice Jet (an anagram for object view) is meant to display WaveFront .obj files. However, it quits when it loads a specific file while on my computer, while on another it does …

Member Avatar for jephthah
0
143
Member Avatar for edek

[CODE=C]FILE* f = NULL; fclose(f);[/CODE] Terminates with: 'No source available for "fclose@@GLIBC_2.1() " ' [CODE=C]FILE* f = NULL; ftell(f);[/CODE] Terminates with: 'No source available for "ftell()"' Why those functions does not return error value but terminate whole program? How can I safely tell if file is opened in C and …

Member Avatar for edek
0
457
Member Avatar for Punkis448

In this work you will materialise a algorithm that solves the problem of Stable Marriage. In this problem we aim at "n" men and "n" women and our goal is the contracting of constant marriages between men and women. Obviously each man can be wedded only one woman and one …

Member Avatar for jephthah
0
114
Member Avatar for RaDeuX

Well I tried to look for any posts on ranking arrays, but all I ever really got were stuff about Google's ranking system. Anyway, I have two arrays. One is arr[] which is the original array, and rank[] is the indexing array. So if I were to print arr[rank[0]], it …

Member Avatar for RaDeuX
0
233
Member Avatar for Onixtender

Hi, This program reads parameters from parameter line : program.exe data.txt result.txt (or somth.) , then takes date from data.txt and writes it to buffer, then program divides buffer to lines , writes to stack, and finally it should pop lines to file, but there is an error doing that... …

Member Avatar for Prabakar
0
137
Member Avatar for Clockowl

Hai all, I ran into a strange issue I never experienced before. Pointers are passed to function, the function allocates memory to them with calloc, and right before the return sanity checks if the pointers still != NULL. That check succeeds, but upon returning and sanity checking in the calling …

Member Avatar for Clockowl
0
100
Member Avatar for nelledawg

Hi guys, I have been working on this for 13 hours straight now, and I am going out of my mind. I have a final due tonight and I cannot figure this out at all. The program is basically a product database for a sporting goods store, and I have …

Member Avatar for Prabakar
0
112
Member Avatar for El Duke

Hi Again, If I have this 2-D array stored in [B]s1[i][j][/B] : [CODE] one two three four[/CODE] And I wanted to copy the whole row IF the first letter of that [B]row ==o[/B] . How Can I do that ? assuming that the destination array is [B]s2[k][l][/B]. I am confused …

Member Avatar for El Duke
0
160
Member Avatar for Prabakar

When I searched the web, I found an intersting program, I dont think I can explain a bit. But, I would like to share it. It displays my home country thats the most I can say about it! Here goes, [CODE=C]#include<stdio.h> main() { int a,b,c; int count = 1; for …

Member Avatar for Prabakar
0
154
Member Avatar for rkittu2000
Member Avatar for jephthah
0
37
Member Avatar for Asat232

How to get lpBaseAddress to pass it to : BOOL WINAPI Toolhelp32ReadProcessMemory( DWORD th32ProcessID, LPCVOID lpBaseAddress, LPVOID lpBuffer, DWORD cbRead, LPDWORD lpNumberOfBytesRead ); It will be very helpful to me if someone can provide a snippet of code how to achieve that. Thanks a lot.

Member Avatar for jephthah
0
105
Member Avatar for kxh29

Hello All! I am trying to do something simple. Which is why our application is failing miserably;) Anyway, I am attempting to use the itoa() - integer to ASCII function to convert an integer value, lets say [B]123 [/B]into [B]"123"[/B]. The code compiles successfully, however during the linking, it says …

Member Avatar for Radical Edward
0
107
Member Avatar for nelledawg

Okay so I'm pretty sure I've completely destroyed this code. All I'm trying to do is send the user-inputted product info into a binary file to display when the user chooses the report option from the menu. I'm so confused though and I think I really screwed it up. [CODE=c] …

Member Avatar for nelledawg
0
97
Member Avatar for manojkumar2004

Hi all, Need some info on "how to use or implement timers/threads/polling mechanism in c language". Need to run the same piece of code on both platforms(windows + linux). Can anyone of you guys suggest me something :) Thanks in advance! ~Manoj

Member Avatar for manojkumar2004
0
405
Member Avatar for natd

I am attempting to write a file matching accounts receivable program. So far I have written the master file that contains the balance of clients and a transaction file that contains the transactions. But I don't know how to match the account numbers of these files so that i can …

Member Avatar for Ancient Dragon
0
117
Member Avatar for fatasscp

Hello World Ive got a question. So basically ive got a program that asks you which file to open, and once u type in one, it dumps the contents on the screen. The contents im dealing with is a list of numbers. So my question is, how can i get …

Member Avatar for sacdpathade
0
111
Member Avatar for Aamit

I want to rename file with name of ip address like (192.168.1.55.txt) In xyz.txt file have ip address. I m finding this ip address but rename giving problem??? [code=c] #include <stdio.h> #include<conio.h> int main () { int result; char ipadd[20]; FILE *pFile;; pFile = fopen ("xyz.txt" , "r"); fseek(pFile,172,SEEK_SET); fgets …

Member Avatar for Prabakar
0
346
Member Avatar for Majestics

Is there is any function through which i can get specific number of integer like we do through getchar() funtion .I AM USING TURBO C 3.0.HELP WILL BE APPRECIATED.

Member Avatar for sacdpathade
0
87
Member Avatar for web_master
Member Avatar for Prabakar
0
63
Member Avatar for somename

Hi everyone. I got a total newbe question and i am new to c programming. I want to write a program that will executing commands , written in separate text file. Lets say, in perl i got something like that: [CODE]open (F,"<file.txt"); $x = <F>; if ($x == "2"){ system …

Member Avatar for somename
0
94

The End.