15,550 Topics

Member Avatar for
Member Avatar for chozotheqhai

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 …

Member Avatar for rubberman
0
269
Member Avatar for dawibob

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 …

Member Avatar for dawibob
0
134
Member Avatar for Bertram

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 …

Member Avatar for vijitris
0
2K
Member Avatar for nagarjuna

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 …

Member Avatar for NASEEMSHAKEEL
0
246
Member Avatar for Jsplinter

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 …

Member Avatar for Jsplinter
0
277
Member Avatar for XodoX

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.

0
103
Member Avatar for uday.raj.73345
Member Avatar for Rahul47

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) …

Member Avatar for N1GHTS
0
217
Member Avatar for N1GHTS

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 …

Member Avatar for N1GHTS
0
239
Member Avatar for zegarnek

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 …

Member Avatar for N1GHTS
1
3K
Member Avatar for Youssef_1

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 ?

Member Avatar for rubberman
0
62
Member Avatar for lazylibran82
Member Avatar for dancks

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 …

0
149
Member Avatar for Rushin1992

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?

Member Avatar for Assembly Guy
0
100
Member Avatar for wayne.nishant

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 ?

Member Avatar for Daemon_CC
0
2K
Member Avatar for DkgMarine

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 …

Member Avatar for Banfa
0
258
Member Avatar for DkgMarine

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 …

Member Avatar for DkgMarine
0
2K
Member Avatar for kent.johnstone_1

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) …

Member Avatar for kent.johnstone_1
0
249
Member Avatar for cambalinho

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 …

Member Avatar for cambalinho
0
778
Member Avatar for naveen1993

#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) …

Member Avatar for naveen1993
-1
127
Member Avatar for cambalinho

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?

Member Avatar for cambalinho
0
287
Member Avatar for Bungie

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 …

Member Avatar for Ancient Dragon
0
283
Member Avatar for rao naeem
Member Avatar for Stavros_1
0
265
Member Avatar for Twee Nguyen

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 …

Member Avatar for Stavros_1
0
1K
Member Avatar for Prithvi.R.K

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

0
68
Member Avatar for Yimeng

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 …

Member Avatar for Yimeng
0
357
Member Avatar for nekoleon64

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 …

Member Avatar for iamthwee
0
369
Member Avatar for Netcode

#include <stdlib.h> #include <string.h> int main(int argc, char *argv[]) { char *first, *second, *third; first = malloc(888); second = malloc(22); third = malloc(22); strcpy(first, argv[1]); strcpy(second, argv[2]); free(first); free(second); free(third); return(0); } Like I said before, I need help learning C and trying to figure out my errors. With this …

Member Avatar for deceptikon
0
204
Member Avatar for Que336

C# Interview tomorrow Hello fellow programmers. I know this doesn't have anything to do with code but I really need some advice. I have a .NET(C#) interview tomorrow for a junior vacancy. The problem I have is that all my experience is based on PHP. I have a good understanding …

Member Avatar for deceptikon
-1
311
Member Avatar for Netcode

Am trying to write a c program to do the following; • Write on the screen: ``Please enter a positive number: ''. • Accept a number from the user. • Keep prompting for more numbers until -1 is entered • Output the sum of all entered numbers excluding -1. • …

Member Avatar for Ancient Dragon
0
162

The End.