15,550 Topics

Member Avatar for
Member Avatar for RenFromPenn

Okay, so I have a menu and a linked list, but I have three problems. First of, if you select option one and enter a name it keeps prompting you to enter another and another. It won't accept any other prompt to do anything else like, for instance, exit the …

Member Avatar for Murtan
0
145
Member Avatar for nm_9218

Can anyone help us regarding the implementation of Incremental Shortest Path Heuristic (ISTH) Algorithm using C?

Member Avatar for Salem
0
93
Member Avatar for benchCUB

hi, how can i read a text file "textfile.txt" with a structure? (in C) thanks the structure is in this form. [code=c] typedef struct list { char ID[9]; char YR[10]; char lname[14]; char fname[24]; }LIST[256]; [/code]

Member Avatar for Ancient Dragon
0
126
Member Avatar for brimble2010

Hi (first post :) ), I have a coursework where we have to read in 50 lines from a file (bubble.txt), sort them into length order and then print them out (its not the whole coursework, just a part). I thought that the only way of holding lines of text …

Member Avatar for brimble2010
0
136
Member Avatar for CoolAtt

hi . i have read a line from a text file & stored it in a string using fgets(). the file contains the following line: C:\Windows\ [CODE]char myline[20]; fgets(myline,20,fp);[/CODE] now i want to append '' in the string so that when i print [B]myline [/B]output is C:\\Windows\\ Any idea or …

Member Avatar for CoolAtt
0
154
Member Avatar for nitu_thakkar

this coding is about copy one existing file into other file but it can't do so throught the command line arg. what is the solution....? [code=c] #include<stdio.h> #include<conio.h> #include<stdlib.h> void main(char *argv[]) { FILE *fp1,*fp2; char c; int i; clrscr(); fp1=fopen(argv[1],"r"); rewind(fp1); fp2=fopen(argv[2],"w"); if(fp1==NULL) { printf("Source File is Not Exist"); …

Member Avatar for Ancient Dragon
-1
134
Member Avatar for RenFromPenn

Hi, Okay, so what I am actually trying to do is open a file, convert any lowercase text to uppercase, and then print it on screen. I thought it best to first just begin by trying to open a file and display the contents on screen. I figured that once …

Member Avatar for Ancient Dragon
0
827
Member Avatar for RenFromPenn

Hi, I need to create a menu of items that the user can select from. These choices will either create a linked list, add an item to the linked list, modify a current entry in the list, delete an entry, display the list, or exit the program. I have looked …

Member Avatar for Aia
0
186
Member Avatar for RenFromPenn

I was working on some programs and now, no matter which one I run, I get an error like this: Unhandled exception at 0x00411be0 in program.exe: 0xC0000005: Access violation writing location 0x00130000. Any ideas what is causing this or how I can fix it?

Member Avatar for MosaicFuneral
0
225
Member Avatar for venomxxl

Hello, I'm quite new here, but there's a problem that needs solution. I think the title says exactly what I want to do. I need to use C for a reason I don't think is this important to mention. I tried searching Google, and found the same solution on most …

Member Avatar for venomxxl
0
381
Member Avatar for nitu_thakkar

hello, i wann know that how 'compiler control directives' preprocessor is actually worked ......? in 'C' language

Member Avatar for ddanbe
0
144
Member Avatar for RenFromPenn

Hi, I am trying to run this program, but I am getting two error messages that prevent it from running. I don't really understand what the problem is or how to fix it. Could someone please help? Here are the errors: "error C2664: 'sprintf' : cannot convert parameter 2 from …

Member Avatar for Aia
0
341
Member Avatar for alunsandro

Hi Everyone..!!:* I'm a newcomer here. And looks like need your help here. I 've just make a program tha simulates The HRN CPU Scheduler.I have no problem in compiling it. But, when I run it, It won't work. :S I don't know which Part of my pseudocode that was …

Member Avatar for Ancient Dragon
0
81
Member Avatar for dinklebaga

Hi All, I am researching writing a program in C that will allow me to control the read/write on a FDD and then to move onto HDD's. I have been given some code that will allow me to do this by one of my lecturers but uses the DOS.H library …

Member Avatar for dinklebaga
0
159
Member Avatar for rangalo

Hi, I want to change the color of my button during runtime.. i am writing the following code inthe OnCtlColor of my dialog box [CODE]HBRUSH CPIVSyncDlg::OnCtlColor(CDC *pdc,CWnd *pwnd,UINT nCtlColor) { HBRUSH hbr = CDialog::OnCtlColor(pdc,pwnd,nCtlColor); switch(nCtlColor) { case CTLCOLOR_BTN: if(pwnd->GetDlgCtrlID() == IDC_STARTSTOP) pdc->SetBkColor(RGB(255,0,0)); return (HBRUSH)m_btbrush.GetSafeHandle(); case CTLCOLOR_DLG: pdc->SetBkColor(RGB(255,255,255)); pdc->SetBkMode(TRANSPARENT); return (HBRUSH)m_hbrush.GetSafeHandle(); …

Member Avatar for mitulgolakiya
0
1K
Member Avatar for nikileshsa

[code=c] #include<stdio.h> # define A 10 const short LINE_SIZE = 255; main(){ char a[LINE_SIZE + 1] = " "; //Error here...why is this an error?? char b[A]=""; //no problem here printf("%d",sizeof(a)); printf("%s",a); } [/code]

Member Avatar for grumpier
0
186
Member Avatar for nabilchampion

Hi, I have a question: Suppose i have a source code file as test.c ------------ [CODE] #include <stdio.h> void __attribute__ (( visibility ("hidden") )) sayHello (void) { printf("hello"); }[/CODE] i make shared library using gcc say named as libhello.so now although the function sayHello is not exported to the libhello.so …

Member Avatar for fpmurphy
0
175
Member Avatar for death_oclock

I am having some trouble with the layout of my project. I'm using several APIs, including the WinAPI and DevIL. I had hoped to encapsulate each one in a separate header file, so that the main program would never have to know whats going on. The problem is, some functions …

Member Avatar for death_oclock
0
154
Member Avatar for somename

Hello. Maybe someone can help me with this, here is my code: [CODE]#include <windows.h> #include <stdio.h> #include <wininet.h> #include <shlwapi.h> #define mb(x,z) MessageBox(0,x,z,0) #define REGKEY "PATH\\to\\my\\key" #define REGNAME "zzzzzzzzzzzzz" #define EXENAME "zzzzzz.exe" void Reg() { HKEY hkey; DWORD dwDisposition; DWORD m_dwMaxFileSize = 16 * 1024; TCHAR m_szLastFileName[MAX_PATH]; DWORD dwType, dwSize; …

Member Avatar for somename
0
178
Member Avatar for blackslither

Hi I'm looking for a "shortest path algorithm" , but with a maximum number of edges limit . So the path has to contain at most N edges . i've found shortest path algorithms but not with a number of edges limit , and i've tried to modify A* , …

Member Avatar for Murtan
0
995
Member Avatar for death_oclock

My application creates a window in the main thread, but I want the message loop in a separate thread. Is there any way to catch the messages from that window while an another thread? I tried giving GetMessage that window's handle, it didn't work. I could just create the window …

Member Avatar for death_oclock
0
105
Member Avatar for nm_9218

Can anyone help me for implementing DSDV algorithm in C language?

Member Avatar for Salem
0
21
Member Avatar for AhmedHan

First, I prepared the class blow : [CODE]class UserDefinedWindow { public: WNDCLASSEX WindowClass; DWORD dwExStyle; LPCTSTR lpClassName; LPCTSTR lpWindowName; DWORD dwStyle; int x; int y; int nWidth; int nHeight; HWND hWndParent; HMENU hMenu; HINSTANCE hProgInst; LPVOID lpParam; char ClassName[MAX_LOADSTRING]; char Caption[MAX_LOADSTRING]; HWND hWnd; UserDefinedWindow() { dwExStyle = 0; //These are …

Member Avatar for EZO
1
367
Member Avatar for smnadig

Hello, The Hexadecimal value of EBCDIC has to be converted to corresponding character as the user inputs it. The following table shows the hexadecimal value of characters in ASCII and EBCDIC. Can anybody help me with an efficient C-Algorithm for this conversion? Char----Deci-------Hex.ASCII---Hex.EBCDIC A ------65---------41------------- C1 B-------66---------42-------------C2 C-------67---------43-------------C3 D-------68 ---------44-------------C4 …

Member Avatar for ArkM
0
1K
Member Avatar for RenFromPenn

Hi, I am trying to change the address in an array using *nums++. When I run the program, however, the first number in the array is skipped. What am I missing? How do I get the first number to display? [CODE]#include <stdio.h> int print(int[]); int main() { #define NUMBERS 7 …

Member Avatar for RenFromPenn
0
111
Member Avatar for somnathsarode

hi , everybody can any one write a "c" programme without main() function "please don't tell me this is not possible " If u know please tell me

Member Avatar for ArkM
0
150
Member Avatar for Relative0

I am having some difficulties in understanding the code below. First I don't understand, is (char***) a cast to a triple pointer to a char? While I am am somewhat familiar with single pointers, these triples are beyond my current understanding and I would like to know, what is the …

Member Avatar for ArkM
0
79
Member Avatar for kikloo

Hi. I am trying to merge 2 chars. in C but i don't know how to do it. My code: [code] char dd[1], aa[2]; dd[0] = "2"; dd[1] = "3"; aa[] = dd[0] + dd[1]; [/code] So it aa[] should show: 23 but it gives error. Maybe i am doing …

Member Avatar for Murtan
0
265
Member Avatar for Excess3

Hello ,, i need to write to opened file in w+ mode.. now the problem is that first off all i need to check first string in each line if he the same to value i want to enter , dont enter and print error : in another words i …

Member Avatar for Excess3
0
119
Member Avatar for dc87

i need help with creating a letter pyramid usin c. this is what the basic pyramid should look like. the - are spaces in front of the letters. [quote] example 1 Type a single lowercase letter and press enter: 3 That is not a letter, enter a lowercase letter:= That …

Member Avatar for Aia
0
335

The End.