15,551 Topics
![]() | |
please help me find the error in this code. whenever i try to get the successor, the program gets the status access violation error. i think it's the parameter. i try using the minimum function outside the delete and it works. but when i try it inside the delete i … | |
I know they don't have standard ASCII values, but how do you check for them? I am making a command prompt-type interface for a text-based RPG a friend and I are making, and I would like to be able to use the arrow keys to navigate in menus. I am … | |
[b]Split from - [url]http://www.daniweb.com/forums/thread8443.html[/url][/b] How do you post each integer in a seperate line once it has been reversed? | |
greetings again. few more question.. [code] /*----------------------------------------- MENUDEMO.C -- Menu Demonstration (c) Charles Petzold, 1998 -----------------------------------------*/ #include <windows.h> #include "resource.h" #define ID_TIMER 1 LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ; TCHAR szAppName[] = TEXT ("MenuDemo") ; int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow) { HWND … | |
Hello. Im new to Trie. I know it's concept but I can't declare and access it correctly. I tried making a code. It's like this. [code=c] #define max 27 typedef struct ctype { struct ctype (*letter)[max]; int counter }trie void main() { trie t; int ctr; for(ctr = 0; ctr … | |
Hi, I have a program that writes to a specific memory location. I can currently read the value doing this: [CODE] #define address1 0x000F0000 //this is the memory location unsigned long *val1 = (void *) address1; [/CODE] So * val1 contains what I need from the other program. Now I … | |
This is an CPU sheduling algorithm i.e proirity sheduling .It show some error that i can't solve please anyone correct it . its very urgent.[code]#include<stdio.h> #include<conio.h> void main() { int a[20],b[20],c[20],e[20],d[10],totaltime; int att,at,aw,awt,t1,i,j,n; clrscr(); printf("\n\t\t\tpriority scheduling"); printf("\nEnter the no of process: "); scanf("%d",&n); for(i=0;i<n;i++) { printf("\n"); printf("\nprocess: "); printf("%d",i+1); c[i]=i+1; … | |
Basically, I'm writing some code that will take text from some .txt files and rearrange them into other .txt files. I've written 3 functions, but ignore the 2nd one, I haven't worked on it yet. When I try to call my 3rd function, I get an error message from Dev … | |
hi....... i want a program in c based on any data structures with de code.plz............it shd be catchy n can be based on reality | |
hi all, thanks for reading my post. sorry about the tittle (so whatever ;)) i have this situation. i have an array like this: lemon banana pineapple and i have fruit.txt which has this inside: corn melon berry blackcurrent apple what i want to do is, i want to copy … | |
Make a C program that will ask the user to input a secret message. Your program will then encrypt and display the cipher text using the encryption formula. Also, to recover the original message, your program should be able to decrypt and display the shift cipher text. Sample Program Interaction: … | |
Hi guys, Would someone please let me know the difference between these two: [CODE] struct node* branch; // this statement struct node *branch; // && this statement [/CODE] Thanks. | |
how about this kind of pyramid? * * * * * * * ** * * * * * * * * * * * * * * * * | |
Hi! I'm working on a compress algorithm. But I couldn't write the software because I don't know how to read and write a file as binary like 101011111111011001. How can I read the like this ? Also I want to ask if I can write the GUI on Java and … | |
I'm working with Kochan's Programming in C. I am working in Visual Studio 2008. When I try to build the program I get Error 2 error C2143: syntax error : missing ';' before 'type' c:\users\michael\documents\visual studio 2008\projects\cpractice\cpractice\char.c 15 CPractice But as far as I'm aware there is no syntax error. … | |
Pls help me to write a c++ program that reads or accept an integer and output its equivalent into base two 2. Write a c++ program which reads an integer and decides whether the integer is a multiple of 5 pls you can help me to send it to my … | |
Hello Everybody, I have just come across this particular piece of code in a C problem set [code= c] main() { int i=5,j=6,z; printf("%d",i+++j); } [/code] The answer for this question is 11 because C evaluates this as i++ +j. But why cant this be evaluated as i+ ++j. Is … | |
Hi All, I am getting segmentation fault when I am allocating memory for the node second time. [code] struct host_msgs_list { [B]struct host_msgs_struct *message;[/B] struct host_msgs_list *next; }; struct host_msgs_list *root, *temp, *temp1; root = NULL; temp=root; For the first message (i.e. OHAD), it’s able to allocate the memory. We … | |
[b]Split from - [url]http://www.daniweb.com/forums/thread231732.html[/url] [/b] Hi guys i want to make a project in which i am planning to create a full functional shell. But i don't know how and where to start from. Please anybody reply if you have any knowledge regarding this. Any website ,any starter information will … | |
I need help creating a grade calculator in C. I am not allowed to use conditional statements. My problem is that I have written code to determine how many total points the student has, but I cannot think of a way to classify those points as an A (90-100), B … | |
umm... hi guys.. this is baulin.Am completely new towards system calls.plz give me some info about the job which exit() system call does.. | |
How to create Run as Administrator option of windows OS in c code.. It is required for my software. plz help me. | |
Hello, so the problem was to create a program that took input from command line to function as a rudimentary calculator: e.g 3 + 2, 5 * 4, 2/3 and so on. We were to take those arguments and pass them and a pointer to a function in to the … | |
C program that will ask the user to input a secret message. Your program will then encrypt and display the cipher text using the encryption formula. Also, to recover the original message, your program should be able to decrypt and display the shift cipher text. Sample Program Interaction: Type your … | |
Hello hello, First of all I was thinking that some of the experts around here could actually start an exhaustive discussion about peripheral driver development for newbies or unexperienced, such as yours truly. I find that theory is in many places, registers of classic peripherals are found also, but never … | |
[code=c] /*the program gots a string, and supposed to copy to the destination string every letter only once, and after a letter a num - a counter how many times a letter appeared in the original string for example - for kuku it should return k2u2 - but it returns … | |
Hi everyone o/ How can I concatenate a no print char from the ASCII on my string? For example: I have the str1 = "Jhon" and str2 = "Lucas" I wanna concatenate the special char 01 ( SOH) between the str1 and str2. can anyone help me? I hope so..!! … | |
Hello C experts, I am searching for a tool which can validate content of printf (static string part) against an english dictionary , have anyone of you come across such tool , here is the example to clarify. [code=c] printf("The value of the interface identifier is %d",i); printf("This intarface is … | |
Hi there... I am a new member here. If my request is not appropriate anyone can delete it. I desperately need help with my school work. I have been doing this for about a week but still don't get how to do. This is a big programming work, so I … | |
I have been asked to create a student database using linked list. this is the question given to me. Write a C/C++ program to perform the task of maintaining student information for 123 College. You are to use a linked-list for storing the students’ information. Each node of the linked-list … | |
Is there any standard rules when we write the main function. I always thought the main function should always be written as [code=c] int main(int argc, char* argv) { ..... return 1; } [/code] But to my surprise, all these definitions are also correct . I got a compile time … | |
[B]Here is the sample program[/B] [CODE]# include <stdio.h> # include <stdlib.h> // COMPILER : GNU GCC COMPILER // EDITOR : CODE::BLOCKS 8.02 struct test { int data; struct test *link; }; void change(struct test *ptr); int main() { struct test *fresh = (struct test *)malloc(sizeof(struct test)); int some_data = 10; … | |
hi there, it's been a long time since i posted a thread here. By the way, i'm having a hard time dealing with this code. Actually it's a menu driven and function-oriented program and when i compiled it, the error message is [U][B]expression syntax in function main [/B][/U] Here's my … | |
Hi I'm really sorry if my questions are stupid. Can someone please explain why we create wrapper function for standard library function? (Example: glib made wrapper function for malloc()) Why do we hook our program to standard library? (malloc, free, ...) Thanks Mark | |
Hi Everyone, I am BRAND NEW to C and I am trying to make a program that takes 3 inputs. The first is a number, the second represents what base the first argument is, and the third argument represents what base this number should be outputted as. For example: convert … | |
I need help with this. It has been awhile since I coded in c. [CODE] unsigned char test=0x00; char tmp[20]; //reserve 20 bytes for string switch(test) { case 0x00: tmp="Hello String 0"; break; case 0x01: tmp="Hello String 0"; break; case 0x0F: tmp="Hello String 0"; } [/CODE] All I want to … | |
[CODE]/* Function to find prime number if so return 1 else return 0 */ #include<stdio.h> #include<math.h> int isprime( int num ) { int i ; int sq = ( int ) sqrt ( num ); /* here check should be done for num = 0 and 1 other wise 0 … | |
I am need to process on images using C. I am working in fedora 10. I am using KDE C/C++ platform. I am interested to work under C only. I want to know if image reading is possible in C. if so what is the procedure. Regards Bharathi | |
i want C++ programing which do- Addition - Multiplication - Finding the Inverse - Finding the Determinant | |
Hello All, I am unable to understand this piece of code [code= c] main() { int i, j; scanf("%d %d"+scanf("%d %d", &i, &j)); printf("%d %d", i, j); } [/code] I got this question from a C problem set. I run this code and I have to give the i/p 3 … | |
The user types bits 110, or 6, and the program returns the 6th input. How do I get the program to scan in a binary and decimal value? | |
Hello, I have a conceptual code related to the C memory allocation model if I have some code of this form, I will get a seg fault [code=c] int main() { char* p; *(p+5)='A'; printf("%c\n",*(p+5)); } [/code] But when I have some code of this form I do not get … | |
[code]Write a C function that implements a 3-bit mux, following the pattern I showed in class. Remember: &&, || and ! are used to represent the logic gates. For testing, your program should behave as follows: three control bits: 1 1 0 eight inputs: 0 0 0 0 0 0 … | |
my function was working all fine and dandy but boring until my friend separated the function for me which we are suppose(required by teacher) to do and now my program stops after i enter the first and last name ( i was the one that added multiple return 0;) i … | |
In the following code: [CODE]for (int i = 0;i < num_neighbors && i != msg.source && neighbors[i].status == EDGE_STATUS_BRANCH;i++) { .... } [/CODE] loop body was never entered. Where as after making this change: [CODE]for (int i = 0;i < num_neighbors;i++) { if (i != msg.source && neighbors[i].status == EDGE_STATUS_BRANCH) … | |
i have an assignment to make a program that forecast the date given by the number of days by the user including leap years. example: Input date: November 20, 2008 Input number of days to forecast: 100 Forecast date: March 01, 2009 pls. help thank you ;) | |
hi.another post by me.ehehe pls check this code.i wonder how this would work: this program asks for the last and first name of the user.and at the same time it must separate the first names of the user.for example, the name of the user is juan miguel bautista. it will … | |
please help im really out of ideas. this program is a phonebook that can store unlimeted mobile numbers, landline numbers and email addresses, this program also deletes, edits,inserts and sorts and display all the records. this is what i've got so far: [CODE]# include <stdio.h> # include <conio.h> # include … | |
[B]i need c program for [/B] [B]1.[/B] "[B]menu driven in c program using pointers[/B]. [COLOR="Red"]1.comparition of two strin , 2.length of two string, 3.reverse, 4.palindrome all without using string function" [/COLOR] [B]2.[/B] "[B]menu driven program using pointer with array[/B]. [COLOR="Red"]1.addition of two matrix, 2.subtracion of two matrix, 3.multiplication of matrix, … | |
i am clear with the concept of Array of pointers & pointer to an Array. but i wonder what is the advantage of creating a pointer to an array though the same can be done just by using twod array with row and col indexes. please some let provide me … |
The End.