15,551 Topics
| |
How can we use volatile variable in C or C++? Anybody can some good code to understand this. | |
Hello there, I am a Java programmer by trade and am VERY new to C so please excuse any blatant pointer ignorance, if possible. I am having a problem with the concept of returning something but also freeing it afterwards within a method. I am implementing a stack program and … | |
Hello, I'm having quite a hard time getting around this access violation error I keep getting. Every time I declare a character string in a structure I can never access it. Here's a small example of my code that keeps giving me a error no matter what I try. [CODE] … | |
Hello I have two c files I am working on. One is a stand alone program (I will call it helper) that will take two ints as a command line argument, add them together, prints the operands and the sum, and exits. This program can be run from the command … | |
I have taken the opensoruce from ~wagnerr/ConfigFile.html for reading configuration file. It perfectly works fine with gcc 3.2.3 and it fail to compile with gcc 3.4.3 on RHEL 4 I am getting following error g++ -Wno-trigraphs -Wno-unused -Wno-deprecated -Wpointer-arith -fno-common -fno-strict-aliasing -fexceptions -DC_GCC_C -DC_GCCBJC -DC_GCC_CPP -fPIC -D_GNU_SURCE -DC_GNUSTEP -DC_LITTLE_ENDIAN -DDEBUG … | |
How to store the data of a program without using registry? Because I don't want the users change the registry and the program settings... Are there any other ways that can prevent the users from changing the settings? | |
I am in need of some help. I need a program that will play the game Three's Free. You roll six dice. 3's are equal to 0. Every turn you take away one of the dice, so every time you roll you take away one die. If you don't roll … | |
dis is a simple c program.. but while using it in borland c++ 4.5 ,, declaration syntax error is being displayed at file1.h ..why so? file1.h [CODE] #define USD 1[/CODE] file2.h [CODE] #define UKP 1 [/CODE] file3 [CODE] #include<stdio.h> #include <file1.h> #ifdef USD #define curr 46 #endif #ifdef UKP #define … | |
Hello , I need to pass a system (linux) result to a varaiable . Example : ... char KERNEL = system("uname"); printf(KERNEL); ... this example dont work , can you help me ? | |
I am getting this compiler error: gcc -g -Wall -O2 -c -o mybash.o mybash.c mybash.c: In function ‘main’: mybash.c:39: warning: implicit declaration of function ‘getline’ mybash.c:41: error: expected expression before ‘)’ token make: *** [mybash.o] Error 1 It probably has to do with something I don't remember about initializing and … | |
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 … |
The End.