15,550 Topics

Member Avatar for
Member Avatar for MIGSoft

Hi, does anybody know how check whether the socket (ie file descriptor) is valid in C? I know it is probably possible to do it using either a read or a write command, however, what other ways are there? Thanks.

Member Avatar for WolfPack
0
137
Member Avatar for sonu2die4

Hello, I want to know how to implement semaphore without the use of while or any if statement The Problem is Thread A , B , C they all want to output the result at the same time A wants ot print 'A' B wants to print 'B' C wants …

Member Avatar for Ancient Dragon
0
143
Member Avatar for rasakse

someone please help me on how to run this coding using knoppix linux.. using c language.. i really need help.. i want to know.. what is the output.. this is the coding :- [code] int main() { Pid_t pid; /* fork another process */ pid=fork(); if (pid<0) { /* error …

Member Avatar for John A
0
128
Member Avatar for ronyd

Is there an api that converts a texual varaible to an OID (which is respresented in dot notation? In net-snmp, there is an api "getnode" which does this conversion. For example, give the api mymib::ronyd.0. and converts this name to .1.0.1.1.5.

0
46
Member Avatar for cusado

hi im still finishing a calculator program. the problem is i am wondering what command to use to break out of multiple loops. my code is [code=c] [COLOR=Gray]#include <stdio.h> #include <ctype.h> #include <math.h> double do0p(char op, float acc, float num) { switch (op) { case '+' : return acc+num; break; …

Member Avatar for WaltP
0
136
Member Avatar for charmee

I have to pass this assignment which calculates the income of workers using pointers and structures.. I'd be very glad if you could help me with this.. uhmm.. could you also please tutor me about this program if you got any answer..?? thanks!!:cheesy:

Member Avatar for WaltP
0
73
Member Avatar for MIGSoft

Hi everybody. In C running in the Unix environment, there are many ways of getting the directory listing. One I know is to use the ftw library (the way I currently implement it), the other is to pipe from the ls, also sometimes you could use dirent.h. I realize that …

Member Avatar for ~s.o.s~
0
147
Member Avatar for cusado

im writing a calculator program in c and having some trouble.. basically it needs to have + - / * ^ functions as well as an integer only mode the code so far [code=c] #include <stdio.h> #include <ctype.h> #include <math.h> int main(int argc, char *argv[]) { float acc, num; char …

Member Avatar for Ravalon
0
184
Member Avatar for arshad mohammed
Member Avatar for aliakseis
0
88
Member Avatar for Lutzee

Hi, it's me again lol... Ok i havea windows forms application. I have several classes with pointers to other classes eg: [code=c] class1 { public: function(void); class2* c2; }; class1::function { c2->variable = 3; return 0; } [/code] I think form1 is an object, maybe this is cos i'm a …

0
60
Member Avatar for Shaabangbang

Hello, i am currently working on the Flapjacks problem, The program compiles correctly, only it keeps going into infinity when i input, it keeps asking for more inputs, and its supposed to stop when i input -1. Here is my Code. [code] #include <stdio.h> #define SIZE 30 int isinorder (int …

Member Avatar for Shaabangbang
0
76
Member Avatar for Nsin

Hi all, in one of the header file I have declared #define GPSINIT "version no" I need to find where this string is stored in memory location. I tried to test_string1 = &GPSINIT2STRING; LOG_Write(test_string1,sizeof((int*)test_string1)); /*this func writes the result to a new text file*/ Also is it possible to get …

Member Avatar for Salem
0
115
Member Avatar for Rickenbacker360

Hello, before I post my question I just wanted to thank those who helped me last time I posted. I was seriously considering dropping my class thinking that I wouldn't be able to do it. However, with my last hw assignment I came here and Niek_e especially pointed out some …

Member Avatar for Nick Evan
0
99
Member Avatar for darkeinjel04

Hi im new here...i am only an high school student, i hav a problem on my this output...im using turbo c, can u help me with ths?? i cant get it...pls help 1. 55555 4444 333 22 1 2. 12345 1234 123 12 1 3. ****5 ***4* **3** *2*** 1**** …

Member Avatar for Nick Evan
0
107
Member Avatar for jan1024188

Hello, Sorry for my "n00bness". I finaly choosed qt. I made an .ui file with qt4 designer and written main file. First: -I included "ex.ui"...IS that right? Will compiler accept that? HEre is the code, [CODE]#include "ex.ui" #include <QtGui/QtGui> int main(int argc, char *argv[]) { QApplication app(argc, argv); app.setQuitOnLastWindowClosed(true); QMainWindow …

Member Avatar for jan1024188
0
107
Member Avatar for hariza

Hi Guys, I need to be able to print something like: [B]Player 2: Enter a word (1-20 char,blank line to quit):[/B] and then right after I have entered the word the output should look like : [B]Player 2: Enter a word (1-20 char,blank line to quit): apple[/B] My printf looks …

Member Avatar for John A
0
140
Member Avatar for pointers

Hi, I am a basic learner in C language.Could u please provide me a good link or tutorial or explanation regarding "order of precedence". I have the table of "order of precedence"........but needed some examples. I am always confusing with them. like, *ptr++=something; *++ptr=something i=i++................etc. Thanks & Regards.

Member Avatar for WaltP
0
196
Member Avatar for k3n

I'm having trouble writing a program. I have to determine the name of student who scores the highest marks for each module and the highest in the average score of 5 modules. Hence display them in a table form where 1st column is the modules and the 2nd column is …

Member Avatar for Lerner
0
195
Member Avatar for priya_pikku

can anyone tell me the code how to connect database in C..The databas3 may be either Oracle ,SQL Server Or MS Acess.. plz help me...

Member Avatar for Ancient Dragon
0
34
Member Avatar for sbenware

I am trying to convert an Enum type called: enum Category{unknown = -1, meat, poultry, seasfood, diary, vegetable, fruit, grain,sweet}; And a struct Food that contains array Category category. The user is given numbers to enter for the Category types, ie: 0 = meat, etc. My program can take that …

Member Avatar for Dave Sinkula
0
938
Member Avatar for Firestone

I want to use a function to get either the number of seconds or milliseconds since midnight, it doesn't matter. Does anyone know of a function that would give me this?

Member Avatar for Ancient Dragon
0
80
Member Avatar for fesago90
Member Avatar for Lutzee

Hi guys i'm tyring to delete some elements from a vector. I am trying to delete from 0 to k-1 and from k to the end. That means in theory that only element k should remain. 1) cell[i][j].erase(cell[i][j].begin(),k-1); 2) cell[i][j].erase((cell[i][j].begin()+k+1),(cell[i][j].end())); line 2 does not give me an error, however line …

Member Avatar for ~s.o.s~
0
82
Member Avatar for ankit_the_hawk

I was starting off with making the game " Cows and Bulls". And to start off i am having a problem in inputting the 4 digit number in a mannar that it appears in form of "*" on the screen. similar to a password. And each digit should be separately …

Member Avatar for Nick Evan
0
150
Member Avatar for shahrossi
Member Avatar for shouvik.d
Member Avatar for shouvik.d
0
83
Member Avatar for edogan

Hi to everyone, I am using createProcess("setup.exe","",...) to launch an installation. When I call this function from a "normal application program" everything works fine. However, when I call same function from a service application, it hangs up when writing information to add remove programs. Can you tell why this happens …

Member Avatar for edogan
0
73
Member Avatar for apurv

[B]Wat according 2 u ppl is the strongest cryptography for c ?:!: [/B] [B]I mean that can be acctualised using a C program.[/B]

Member Avatar for sham51
0
146
Member Avatar for bluecat

To do shapes in the form I use a vector that stores a struct with the x, y, color and shape values of every shape I put on the form. I have to save and open these values. To save and open files with shapes. I use a TOpenDialog and …

Member Avatar for bluecat
0
96
Member Avatar for tehloki

Hey, I have here a piece of code that works in parts but does not work together. If I test all three parts at once, I get a segmentation fault immediately before the program is supposed to test for a (null) value in the string array. However, if I comment …

Member Avatar for Ancient Dragon
0
971

The End.