15,552 Topics
| |
I have some experience with client-server codes. TCP and udp client. I want to know how a stream socket works with HTTP. This client is for a server-client code where the greatest common divisor is calculated and displayed. #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <errno.h> #include <string.h> #include <sys/types.h> … | |
I am preparing for my exams and i just found this question from previous question papers: Give the C Expression for the following algebric expression : 1. ab^4c^2-d/m-n 2. ab-[{(e+f)^9}/c}] Please help me as i am preparing for my exams and haven't read this topic yet. help plz | |
I need a way to print(and later on compare - but for now just print) characters 2 by 2 as in: I have a string of 1F190307091810 and I have to print out: 1F 19 03 04 09 18 10. I need this for Baudot code(I have segments of code … | |
Currently doing C programming homework, I want to update the value in the file. But now I'm having a problem updating it. The problem I faced now was the codes below update the values but in the form of new lines. Instead of replace the original lines. What's wrong with … | |
Hello I'am looking for an alternative of system("CLS") , i don't need my whole screen cleared , i just want a specific text cleared for example : i want the word "loading" to remain on the screen while ". . ." these three dots appear and disappear for period of … | |
Hi I wonder if any kind soul could help me with a timer problem in c. I am not at all experienced in writing c code. In a c dll (called from a vb user control) I need to avoid blocking the parent application, and also be able to abort … | |
Hi, I m Nagarjuna.I m doin my Masters in Computer Science at Indian Institute of Technology, Kharagpur. My thesis is on VANET security. I m doin a simulation using GloMoSim software. I want to broadcast messages/packets to all nodes(within the transmission range). As far as I ve understood the GloMoSim … | |
I have an mxn matrix, that is stored in memory in an array: matA = new float[m * n]; // ... Assign values matA[0] = 1; matB[1] = 2; // ... After I finish with this array, I then need to create very similar array to store a new mxn … | |
I want to create a simple stream socket server. I haven't found a website that explains it well. So how do I create a simple stream server ? One connection is fine. | |
| Well, this morning I tried to write a program to update environment variable's list. And I got stuck at a very crucial point. I think am making some silly mistake. A second opinion will be helpful. Algorithm: 1) Take complete path of environment variable into a string variable 'env'. 2) … |
Say I have code like this... typedef struct { unsigned A:1; unsigned B:1; } FlagStruct; extern FlagStruct *Flags; Imagine that the Flags instance is a shared resource in a multi-threaded application. Say thread #1 decides to read the value of Flags->A but thread #2 decides to set or clear Flag->B … | |
| Hi, I am just playing with C code in the console under Linux. In the old times a fair bit of code was written for a console; programs were operating in text mode, creating menues was quite a fun. I coded very simple c routine to print a strings of … |
i am supposed to write a code for searching for a memory offset of a hexadecimal value in a binary file , i successfully wrote the code for normal search but i was asked to do it using binary search any ideas on how can that be done ? | |
This code allows you to create a linked list and reverse it recursively. | |
I wrote this test program to test the binary tree for a particular purpose. The intent is to make 2 new tree nodes with new data and destroy the data of the parent data, as its no longer needed (essentially its supposed to imitate "splitting" but my design calls for … | |
Hello, My problem is like that when I scan the data using fgets function and after I put fflush function but compiler not wait for taking a data and it is directly go in next value scan.How to solve my program? | |
C Program - to accept 'n' strings from user and store it in a char array I am currently using Turbo C++ Version 3.0 (one with blue screen) Can any one help with the C Code of the subject ? | |
So i'm new to C and i have a problem with struct, so when i run the program it goes to the_struct2 asks for first name and thats it. why does it stop working? is there a way to make the code more efficient? and is there a way to … | |
hey guys, so i get the "c incompatible types in assignment" error in the malloc line. would someone please explain where i went wrong? Thank you in advance. #include <stdio.h> #include <stdlib.h> struct the_struct { char FirstName[20]; char LastName[32]; int Score[20]; }; int main () { int i,n; struct the_struct … | |
Hi, I'm getting an error that says my defined constant is not a function. It's not supposed to be a function. This is the error... Tick.c:389:35: error: called object '200000000ul' is not a function It points to... #define TICKS_PER_SECOND ((GetPeripheralClock()+128ull)/256ull) GetPeripheralClock has the error. It comes from... #define GetSystemClock (200000000UL) … | |
the WindowClass.hbrBackground=(HBRUSH) CreateSolidBrush(RGB(0,255,0)); change the all windows backcolor, registed with these class(WindowClasss). and for change the DC\window backcolor we need use WM_ERASEBKGND or other messages for do it(i don't remember how). but the SetDCBrushColor() do the job, right? but seems be ignored :( i'm using it in WM_PAINT messages. can … | |
#include<stdio.h> #include<conio.h> #include<graphics.h> #include<dos.h> void base() { int k,l; for(k=0;k<20;l=l+16,k++) { rectangle(100+l,400,116+l,418); //square box line(107+l,418,107+l,413); //middle down to up line line(107+l,413,100+l,409); //middle to left side line(107+l,413,112+l,400); //middle to up side rectangle(100+l,418,116+l,436); line(107+l,436,107+l,431); line(107+l,431,100+l,427); line(107+l,431,112+l,418); } } int main() { int gd=DETECT,gm; int i,j,k,l,ch1,ch2,x=90,y=389; initgraph(&gd,&gm,"c:\\tc\\bgi"); //base(); ch1=getch(); while(ch1==32) { base(); if(ch1!=32) … | |
the DrawText() function is for draw text with a rectangle size. but if the DT_VCENTER is used with DT_SINGLELINE, how can i use the "\n" and "\t" strings formats? | |
Hello I'm working on this final project. I need to create an ATM program with a unique pin code. However every time I run the p I have done 3 hours of researching and I've decided to just ask. What am I doing wrong that it's just running the do … | |
i want the code o snake game by using c lanuage anyone can help?:) | |
I have a problem with the error "cannot convert from 'int' to char[][] ". I check it for many times but I do not know how to fix. I just start with C. Could you help me, please? The error in the lines 23, 25, 28, 32, 64. I would … | |
Hi, i'm trying to write a c code for finding height of silhouette at every given [oint of x using brute force can any one help me out please. Thank you | |
I've learned the hello.c using FUSE. It can create a hello file under mountfile. But I've no idea about how to create a folder under the mountfile and then create hello under mountfile/folderIcreate. then I can use cat mountfile/folderIcreate/hello the code is similar to the simple hello.c. #define FUSE_USE_VERSION 30 … | |
My Name is Leonard E. Norwood Jr. I'm Undergraduate student from Norfolk State University in Norfolk Virginia. Getting down to the point, my program is supposed to print out a list of pre-set numbers in reversal. I used pointers for this, however, something went wrong so I'm trying my best … |
The End.