15,550 Topics

Member Avatar for
Member Avatar for shrublet

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 …

Member Avatar for rajdesire
0
110
Member Avatar for asm2hex

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

Member Avatar for JuhaW
0
117
Member Avatar for Kru

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 …

Member Avatar for Kru
0
134
Member Avatar for ankur_

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 …

Member Avatar for gerard4143
0
360
Member Avatar for kymarscheng

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?

Member Avatar for kymarscheng
0
165
Member Avatar for FreakNFlow

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 …

Member Avatar for WaltP
0
87
Member Avatar for solitude_spark

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 …

Member Avatar for Nick Evan
0
84
Member Avatar for robbtek

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 ?

Member Avatar for Salem
0
370
Member Avatar for kylcrow

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 …

Member Avatar for kylcrow
0
154
Member Avatar for cmsc

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 …

Member Avatar for cmsc
0
195
Member Avatar for Diode

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 …

Member Avatar for hsp700
1
4K
Member Avatar for batman3

[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?

Member Avatar for WaltP
-2
34
Member Avatar for Covinus

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 …

Member Avatar for downtimedk
0
511
Member Avatar for Whilliam

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 …

Member Avatar for abhimanipal
0
72
Member Avatar for ibuguser

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 …

Member Avatar for gerard4143
0
144
Member Avatar for priyarrb

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

Member Avatar for abhimanipal
-1
141
Member Avatar for mattitude

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 …

Member Avatar for mattitude
0
370
Member Avatar for swathydoss

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

Member Avatar for jephthah
-4
88
Member Avatar for ubi_ct83

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 …

Member Avatar for WaltP
0
69
Member Avatar for mhera

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

Member Avatar for Salem
-2
93
Member Avatar for SecurExpert

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.

Member Avatar for Ancient Dragon
0
63
Member Avatar for pao+kriz
Member Avatar for gerard4143
0
55
Member Avatar for miles.85

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 …

Member Avatar for miles.85
0
141
Member Avatar for mfrancis107

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

Member Avatar for WaltP
0
154
Member Avatar for vicsta

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 …

Member Avatar for Narue
-1
102
Member Avatar for abhimanipal

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 …

Member Avatar for SpyrosMet
0
262
Member Avatar for thirupathireddy

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 …

Member Avatar for abhimanipal
0
107
Member Avatar for james chaco

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

Member Avatar for abhimanipal
0
107
Member Avatar for jennystc

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 …

Member Avatar for abhimanipal
0
187
Member Avatar for baulinp

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..

Member Avatar for adnan.siddique
0
99

The End.