15,552 Topics
| |
Hi any one please tell me why the warning is generated when the address of pointer to a local variable is passed. [U]The following is the warning generated:[/U] Icore.c:228: warning: passing argument 3 of foo from incompatible pointer type [U]The function declaration is:[/U] int foo(void * , int , void**); … | |
please help me with this SUPPLY IT! Your program will have a 3x3 array. The user will input the sum of each row and each column. Then the user will input 3 values and store them anywhere, or any location or index, temporarily in the array. Your program will supply … | |
| 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 … |
Can anyone help us regarding the implementation of Incremental Shortest Path Heuristic (ISTH) Algorithm using C? | |
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] | |
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 … | |
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 … | |
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"); … | |
| 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 … |
| 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 … |
| 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? |
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 … | |
hello, i wann know that how 'compiler control directives' preprocessor is actually worked ......? in 'C' language | |
| 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 … |
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 … | |
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 … | |
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(); … | |
[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] | |
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 … | |
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 … | |
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; … | |
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* , … | |
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 … | |
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 … | |
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 … | |
| 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 … |
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 | |
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 … | |
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 … |
The End.