18,491 Topics

Member Avatar for
Member Avatar for komany

Hello I have little problem with a code. I want to send information about a size on a file and uses “size_t filesize”. I will send this information thru a network called ”controller area Network” and uses the code stat = canWrite(hnd, 1234, size, 8, canMSG_EXT); in order to do …

Member Avatar for Ancient Dragon
0
190
Member Avatar for Drake

Data types are used to represent numbers and characters used in a program, why do programmers benifit from having such a variety? Also if anyone could help me out with what an unsigned character is used for? thanks for the help

Member Avatar for Narue
0
118
Member Avatar for Aamit

Hi.... I want to create program to show that [COLOR="Red"]bios password is set or not[/COLOR] means Bios password is Enable or Not... [COLOR="Red"]How to check this setting through c or c++ programing[/COLOR]........not by manual setting Is it any registry or log or inf file that shows Bios password is enable …

Member Avatar for Aamit
0
49
Member Avatar for nelledawg

I am so incredibly frustrated right now. I have seriously been sitting here for hours trying to figure out how to validate program input using ranges from a text file. My teacher gives us a lecture that is supposed to help, but the lecture doesn't even have a thing to …

Member Avatar for nelledawg
0
128
Member Avatar for cheesy_mel

Hi.. I'm want to read each record (in 1 line) using fread(), the problem is the record length is arbitrary.. e.g. 1 "Joshua" "Rosenthal" "34 Mellili Ln" "Earlwood" 1 "000113133121" 0.000 2 "Martin" "Serrong" "45 Rosenthal Ccl" "Doveton" 1 "000113133121" 0.000 3 "Jacob" "Leramonth" "59 Dalion Pl" "Belmont" 1 "000113133121" …

Member Avatar for cheesy_mel
0
149
Member Avatar for sfak271

I´m writing a program to find the divisors of a number, using the modulo function. my problem is, i´m supposed to use an array to "output" the divisors, and the output should stop when an empty cell is reached. I´m not very confident with arrays and don´t really know how …

Member Avatar for Ancient Dragon
0
303
Member Avatar for spec80

Hi, I am writing a problem that only works when a certain character is entered (either A, B, or C), and if that character is not entered, the program will loop around until A,B , or C is entered. So i tried the following code segment below, but even when …

Member Avatar for spec80
0
106
Member Avatar for KeeperOfTime

Hi I'm programming under DOS 6.2. I want to switch the polarity of the interrupt source 5 from "high active" to "low active" so an IRQ appears on a negative edge instead of a positive edge (or level, in my case it's edge). Does anybody know how to do this …

Member Avatar for KeeperOfTime
0
141
Member Avatar for pete212

Hello, I am trying to learn C and would like to create a program that opens a text file (already created) and reads out the words contained within onto the screen. Not to sure where to stat with this, please can someone give me some ideas? Thanks in advance.

Member Avatar for pete212
0
108
Member Avatar for benchic_s

I need to write an lc3 program that calculates the square root of a number. It needs to be done using the Newton method. Can somebody please help me?

Member Avatar for Salem
0
79
Member Avatar for Aamit

I want to read the registry of usb [COLOR="Red"]HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR[/COLOR] in this Name Type Data start REG_DWORD 0x00000003(3) when double click it gives value in Hex 3 How to read this value 3 or data 0x00000003(3) How to create this code in c language??? How to do it guys If any …

Member Avatar for Narue
0
119
Member Avatar for sanu_sharma

hi all, i am developing an browser in c from scratch, parsing i am able to doing and now in rendering i am facing some problem, so anyone have any Experience on webrowser in c help me out. thanks & regards sanjeev sharma

Member Avatar for Narue
0
39
Member Avatar for dgg32

What is the difference between char* and string? I mean, if char* can also use string's functions or can there be "=". Thanks all the same.

Member Avatar for Ancient Dragon
0
117
Member Avatar for Afi83

[B]Hi there[/B] I am really new in C programming (about 3 weeks). Before I begin my question I have to excuse because of my bad English. My question is on reading a file that contains double and integer type numbers. For reading file I use fgets() that read a line …

Member Avatar for Afi83
0
479
Member Avatar for knewc

So uh, i need some help with these functions..i gotta reverse, but i do not have the functions that can make it lowercase, or remove punctuation [code=cplusplus] #include <iostream.h> #include <string.h> char your_string[256]; char new_string[256]; void ReverseString(); void main() { cin.getline(your_string, 256); ReverseString(); cout << ReverseString(your_string) << "\n"; } void …

Member Avatar for Ancient Dragon
0
161
Member Avatar for LightSystem

Hi there, Im new to this site, and I just have a question of something that I have been trying lately in the C language. I need to put a whole array in a shared memory file (using POSIX). I have no problems putting simple int* in shared memory. I …

Member Avatar for LightSystem
0
148
Member Avatar for pete212

Hi, need some help with this one. Here is the question: Compose an algorithm for a program that creates a list of words encountered when reading a series of text files. Write a program to open, and subsequently close, each input file, terminating should an attempt to open any file …

Member Avatar for Narue
0
243
Member Avatar for AWKTM

Hi all, I am new to Programming,can anyone guide me how to go about this senario, The requirement is like this, In a System there are 8 faults as below, Fault -Fault Code-Description INF1-26-unknown Drive rating INF2-27-for Unknown or Incompatible Power Board INF3-28-ISL communication Fault with Power Board INF4-29-Invalid Industrialization …

Member Avatar for AWKTM
0
119
Member Avatar for w0090463

Hi All, I need help to sort out my C Practical question. I am new to C and looking forward to do programming can some one help for the following. 1. How to write a program in c to calculate file size from KB to Bits? 2. How to write …

Member Avatar for ajay_kumar47
0
199
Member Avatar for MjLaali

Is there any way to pass a class as a function pointer. for example: [code=C++] int compare(int a, int b) { return a - b; } void sort(int *ar, int (*pf)(int, int)) { //a sorting algorithm. } class MyClass { bool condition; public: int compare(int a, int b) { if …

Member Avatar for bugmenot
1
156
Member Avatar for abcd_nima

someone please help me to write a program that would replace all occurances of a substring in a string ,with a given string.if the input string is "the the the the",& if the substring to be deleted & the substring to be substituted are "th",&"ase" respectievely then the output should …

Member Avatar for Salem
0
101
Member Avatar for squint

Hello, I am a first time poster and not that familiar with HTML codes or uses. I did try to look this one up and could not find it. When I enter 26.2, it gives me 26.20001. I do not understand where that 1 is coming from. Thank you [CODE]#include …

Member Avatar for jephthah
0
144
Member Avatar for sonia sardana

Hey frnds, i have faced the interview question-- Suppose time is 11:00, What is the degree at this particular time??? Suppose time is 3:00, What is the degree at this particular time??? I have clue abt this question,plz reply.

Member Avatar for Salem
0
103
Member Avatar for komany

Hello. I need help with a thing. I have a file (sound file) I will send via controller area network and therefore can only send data about 8 byte or 8 vector as data [8]. This is sent away with the command sendfile () And I need help how I …

Member Avatar for komany
0
353
Member Avatar for wollacott

the last for loop i declared it inside, which doesnt work as a c program its c++ i need to declare it out side how do i do that? [CODE] #include <stdio.h> #include <string.h> #include <ctype.h> // Our function declaration saying it takes one string pointer and returns one string …

Member Avatar for Narue
0
194
Member Avatar for wsn

Hi, I'm trying to make this code works but with no luck so far, I have two problems 1. I'm reading from a file lines and then executing them but the last line goes into an infinite loop 2. Another problem is I don't think I'm using "wait" properly as …

Member Avatar for wsn
0
118
Member Avatar for Acquire

So I'm writing a program in C that reads in a bunch of words from an unspecified number of files and I'm to print out the top N words in the file. I'm using a hash to store them in, where each bucket is a linked list. The lists are …

Member Avatar for Ancient Dragon
0
155
Member Avatar for tohamy

please, i want application for map coloring using csp algorithm this application include four color to colored 6 lables by csp algorithm

0
60
Member Avatar for wollacott

You will read in a file supplied from the commandline (filename.ext,) and write/overwrite out a file which will be called (filename.ext.mng.) This file will be essentially the same as the original file, but will have all characters on all lines the reverse of the original. For example: The original file …

Member Avatar for Aia
0
159
Member Avatar for CoAstroGeek

Python has some nice features for working with paths: [url]http://docs.python.org/lib/module-os.path.html[/url] Does anybody know of any C/C++ functions, techniques or libraries to do something similar? For example, if I'm passed a path on the commandline as such: x = "~/mystuff/../myfile.txt" In python I could get the absolute path as such: os.path.abspath( …

Member Avatar for vijayan121
0
190
Member Avatar for abcd_nima

iam a 1st yr b.e stucent.i was attending my c.p lab viva.i was asked to write a program that would exchange 2 variables without using a third variable.i could'nt do it.i know how to exchange the values by using a third variable.someone please answer this question.

Member Avatar for hammerhead
0
191
Member Avatar for edek

[CODE=C]int test[2]; pipe(test); FILE *to, *from; if ((to = fdopen(test[1], "w")) == NULL) return 1; //error: could not create stream if ((from = fdopen(test[0], "r")) == NULL) return 1; //error: could not create stream fputs("test text", to); char testBuff[5]; fgets(testBuff, 5, from); puts(testBuff); //This should display 'test' in console - …

0
66
Member Avatar for natd

I am having trouble reversing the words in a sentence. For example "a line of text" should be printed "text of line a". So far I can only print the last word, it is probably obvious but at the minute i just can't see how to do it. Any help …

Member Avatar for natd
0
831
Member Avatar for sahil_itprof

Can any onbe say me the exact difference between a pointer (*p) and the array p[]???? I mean to ask that when we pass an array to a function by reference, we can have both in the function definition, the * or we can manipulate the array too... But there …

Member Avatar for Aia
0
209
Member Avatar for Ryano24

I am trying to do a program that produces random limericks and this is what I have so far... I am posting this again, because I don't think the first one went through. Sorry if it did... #include <stdio.h> #include <time.h> #include <stdlib.h> #include <string.h> #include <ctype.h> int main(){ char …

Member Avatar for jephthah
0
108
Member Avatar for guvengunes

Write a function that fills in a given matrix with the given numbers so that the sum of all columns and all rows should be equal to the same number. The prototype for the function should be void fillMatrix(int mat[][MAXSIZE], int numbers[], int rowSize, int colSize, int sum); For example, …

Member Avatar for jephthah
-4
105
Member Avatar for rock_rocks

Hi all, I have read an YCbCr image by using fopen, fread using C. I wanted to extend this to read multiple frames like in a Video. How should I proceed? I should take a while loop, but then what is the limit of the counter. After reading those images …

Member Avatar for jephthah
0
140
Member Avatar for fredmac

I need help changin this program around right now it tellls rather the number is prime but i need to make the program tell rather the user puts in is even or odd heres a lil code let me knw if i need to put all the code on there …

Member Avatar for jephthah
-1
93
Member Avatar for samush

The problem is that my program crasches when at line 13. Pot10 i an int and lgth is an int so whats the problem? I can't figure it out:( [CODE=c]typedef struct ArrInt{ int intM[100], lgth; } megaint; void scanMeg(megaint *x){ int Pot10 = 0, ret,IntArr[100]; char c; while( (c = …

Member Avatar for Salem
0
274
Member Avatar for Spagett912

Hey everyone and anyone who reads this. I'm trying to make a program that can have a function prompt for 2 integers: void InputNumbers(int & num1, int & num2) find the GCD of any 2 integers: int gcd(int num1,int num2)" and finally display the GCD. void DisplayGCD(int answer) This is …

0
93
Member Avatar for Aia

Frustrating doesn't even start to describe the experience that wanting to post a well formated snip of code is at times. [B]e.g[/B] [URL="http://www.daniweb.com/forums/post583165-6.html"]Example[/URL] Spent quite sometime aligning expressions and clicking the darn "preview bottom". When everything seems to look more or less what I wanted, I pressed "Submit" and what …

Member Avatar for Aia
0
184
Member Avatar for cbrown153

Hi everyone, I'm new to C programming and I'm trying to write a program that can print text in columnar format with a maximum width. I've been trying with this but I get a seg fault. Am I going about this the right way? Any help would be really appreciated. …

Member Avatar for Aia
0
87
Member Avatar for cppsevennine

was hoping someone could help me with semaphores...im a little confused heres the question: There are three kinds of processes in a system: type A, type B and type C. There are many processes of types A and B, but only one process of type C. The type C process …

Member Avatar for jaux
0
157
Member Avatar for hobbsalex

Hi there, I'm having a problem with adding a data structure to an existing linked list that has highlighted a gap in my knowledge about the latter. Briefly, what I am trying to is add a 'particle' to the end (i.e. appending) of an existing linked list of particles. My …

Member Avatar for Salem
0
115
Member Avatar for rayscosmic

Hello i am new in perl scripting.I have to write a script to check for .c file and then go in to the ,c file and find all function and insert line1 after `{` and line2 before `}` or before return( if return is present). Can any1 plz help me …

Member Avatar for KevinADC
0
203
Member Avatar for tah

Hi Sir Write a C program to count and print the total number of: upper case letters, i.e. ‘A’ to ‘Z’ lower case letters, i.e. ‘a’ to ‘z’

Member Avatar for jephthah
0
286
Member Avatar for emilio

hello i am trying to figure out the output of this specific code [CODE]int main() { int i , parent_id , ans ; parent_id = getpid() ; for ( i = 1 ; i <= 5 ; i++ ) { if ( getpid() == parent_id ) { ans = fork() …

Member Avatar for emilio
0
517
Member Avatar for sjgriffiths

Hello char **pOutData; /* Output results */ char *ptoken I have a pointer which contains the following hdjhasdjkhasd;stephenjohnson;647823463;dhasdjhaj I want to work through and get out just stephenjohnson I have the following so far, which does not work....any help? [code=c] for ( size = 0; size < b2b_data_drill_nNoSelect; size++ ) …

Member Avatar for Ancient Dragon
0
160
Member Avatar for SonxQ7

Hi all, new here so have 1 question... Am wondering this forum has a section for Windows Programming discussions

Member Avatar for Ancient Dragon
0
107
Member Avatar for melystar

Hello, I'm still getting the hang of coding (just started a few weeks ago) so this may seem like a daft question. I keep on getting three errors when I run my code: ode_functions.c f:\ode_functions.c(41) : error C2296: '^' : illegal, left operand has type 'double' f:\ode_functions.c(41) : error C2297: …

Member Avatar for Nick Evan
0
193

The End.