19,876 Topics

Member Avatar for
Member Avatar for kaku_lala

Folks, here is an implementation of memset(), however I have been told that there is one logical mistake in the code. Could you help me find it. I feel that a double pointer for the target string should be passed to this function, which will be like passing the address …

Member Avatar for whyname
0
218
Member Avatar for Peter_APIIT

Hello to all of you, does anyway know any free trial limited SMS gateway. Anyone expose to SMPPLib available at code project ? [url]http://www.codeproject.com/KB/library/smpplib.aspx[/url] Please share. Thanks.

0
66
Member Avatar for Whilliam

Hello. I'm not getting the desired output for my program. The problem is specifically in the file. I can get it to save and load but when I try displaying it, its gonna have a General Protection Exception error. Here's my code. Please help [code=c] #include<stdio.h> #include<conio.h> #include<string.h> #include<stdlib.h> #define …

Member Avatar for Tom Gunn
0
151
Member Avatar for Gaiety

Hello, i have written the code for checking a given tree is strict binary or not. i tried the following code but i am not getting the correct result. and i unable to understand how to check. int strict ( BST_t *p ){ if( p == NULL ) return 1; …

Member Avatar for Tom Gunn
0
1K
Member Avatar for D_switch

please help im really stuck in my sorting you see i need to make a program that asks the user 10 names of people then the array of names gets pass to another function where it is sorted in ascending or descending depending on what the user wants. that function …

Member Avatar for D_switch
0
5K
Member Avatar for revenge2

Hey there, How do I installer gtk+ under windows and compile using the gcc compiler through command line. (not using IDE, just notepad++). I've been looking at the gtk+ site but don't have clue as to where to start and how to install libraries. What do I download and how …

Member Avatar for revenge2
0
131
Member Avatar for DC257209

Hey everyone, i'm new to the site and i'm lookin for some help on this program i have to write. I am 100 percent a beginner and don't really know what i'm doing. I need to write a short program that reads in the height at which the ball is …

Member Avatar for vmanes
0
293
Member Avatar for iceshells

#include "include.h" #include "extern.h" int ExternalIP(SOCKET Sock, char *szChannel) { DWORD dwRet = 0; HANDLE hHandle; char szIP[16] = {0}; char szTempPath[MAX_PATH] = {0}; char szTempFile[MAX_PATH] = {0}; char szSendBuffer[512] = {0}; if (!szChannel) return false; GetTempPath(sizeof(szTempPath) - 1, szTempPath); GetTempFileName(szTempPath, "Temp", 0, szTempFile); // if (URLDownloadToFile(NULL, "http://www.whatismyip.org", szTempFile, 0, …

Member Avatar for iceshells
0
158
Member Avatar for VernonDozier

I have a data file that, if I was using C++, I would use the getline function to read its data into the proper variables. However, the getline functions that C++ allows appear to not be available to me in C. I want to be able to specify a stream, …

Member Avatar for VernonDozier
0
243
Member Avatar for vileoxidation

Hello! I am taking a scientific computing class, where we are doing some programming in C, and right now our assignment is to add commentary to an existing program explaining what every line does (starting at the line that says Start here!). As you can see in the code below, …

Member Avatar for vileoxidation
0
123
Member Avatar for mrman208

Hello, I am making a program to make a directory in a users Library folder then create a file in it. Whenever I try to make the directory I get an error and if I continue with the program i get a segmentation fault error Here is the source Code …

Member Avatar for codeguru_2009
-1
173
Member Avatar for arcticM

realy desperate here.. :'( my prog is getting data about problems (computer/electricity..ect (not real C problems)) from txt file..and every line in file has a different problem..so I made one PROBLEM problem; (object) and in my getProbDetails() function I'm getting the first line..reallocing to add one more object (creating array …

Member Avatar for arcticM
0
171
Member Avatar for kele1

i'm supposed to write a program that simulates cointoss. for each toss the program should print heads or tails and it would toss 100 times and counts the number off times each side of the coin appears. it should also call a seperate function 'flip' that takes no argument and …

Member Avatar for NathanOliver
0
234
Member Avatar for Sobakaa

Hi, guys, i need some help, as i can't find a mistake in my code for some hours. I'm expiriencing a problem in function makeCodes, which should make huffman codes for my symbols. In my head this works just fine, recursively making codes, but my Visual Studio crashes on the …

Member Avatar for Sobakaa
0
88
Member Avatar for edwar

Hi, is there anyone who could help me to writing my program output to txtfile. i mean read file and write the output to txtfile for example: FILE *fp fp = fopen("test.txt", "r"); if(fp = NULL){ printf....... } and what should i do to writing the output to txtfile thanks …

Member Avatar for yellowSnow
0
104
Member Avatar for sv_1124

could anyone help me with this code? the algo is alroght when tested manually. guess there is some problem with the declaration part which gives huge values(garbage ) thank you[code]#include<iostream.h> #include<stdio.h> #include<stdlib.h> #include<math.h> #include<conio.h> #define m 10 // m samples #define n 5 // n variables #define dim 5 //whatever …

Member Avatar for tux4life
0
255
Member Avatar for ching1007

hello.. Can anyone help me? I have to use c programming to calculate the single-error-correction double-error-detection.. I have no idea on how to start to write the program.. I only know that hamming code is used to correct single bit error and parity bit is the error detecting code.. This …

0
46
Member Avatar for chunalt787

I am a C++ and Java programmer and I just have a couple simple syntax questions that I can't find a clear answer to. Yes I tried Google. [B]Question 1: [/B]I found the following code on another forum. [CODE]typedef struct List { char* Name; char* Address; BOOL is_present }List_info; List_info …

Member Avatar for chunalt787
0
152
Member Avatar for MrNoob

hello i was reading today some stuff abt bitfield but here in this program I understand most of it but there unnamed fields inside the structure book says its stuff for allgiment or something like that i dont rlly get what does it do [code] /* fields.c -- define and …

Member Avatar for codeguru_2009
0
145
Member Avatar for kyumi419

hhmm.. i need to get the pattern of this particular output on one digit odd number.. could anyone please teach me? ^^ if the number is 9: then the pattern is: *000*000* 0*00*00*0 00*0*0*00 000***000 yeah, the three asterisks get nearer as the line gets down... how can i formulate …

Member Avatar for kyumi419
0
108
Member Avatar for kyumi419

hello~ Write a program that will display a pattern depending on n. Assume n as a one digit odd number. Example: if n=9, display *000*000* 0*00*00*0 00*0*0*00 000***000 how will i start doing this type of problem? ^^

Member Avatar for kyumi419
0
205
Member Avatar for sftwr21

I'm a noob when it comes to C programming. I wrote a simple program that runs an infinite for loop. But inside that loop I wanted to create another loop to stop the user three times after entering incorrect passwords. I tested from different angles it seems like the infinite …

Member Avatar for sftwr21
0
214
Member Avatar for edwar

have this code and when i run it, i get the output on the screen, what i would like to do is that i can see the output on the screen and send it to an xls of cvs file. is there anyone who could chage the code and let …

Member Avatar for edwar
0
138
Member Avatar for MrNoob

I m trying to find idea to change like from 1 to one and 2 to two and 3 three from 1 to 999 i m had an idea to do like a string with information etc ? but i want better idea so i dunno how to do it …

Member Avatar for Anjoe18_Edica
0
226
Member Avatar for arelius

Hello all, I am taking a course in C++ and in Ada. Our professor has given us the choice to be tested in language profficiency in either C++ or Ada. The test format will be of simpler programming problems and more geared towards shortanswer concepts. I was wondering if anyone …

Member Avatar for dgr231
0
240
Member Avatar for Kombat

p1a.c: In function `main': p1a.c:20: parse error before `char' p1a.c:46: parse error before `char' p1a.c:47: `result' undeclared (first use in this function) p1a.c:47: (Each undeclared identifier is reported only once p1a.c:47: for each function it appears in.) p1a.c:47: `basechars' undeclared (first use in this function)

Member Avatar for Kombat
0
149
Member Avatar for Kombat

You are required to write a C program to carry out a strict-left-to-right evaluation of an arithmetic expression consisting of integer constants and the operators +, −, *, and /. Here, the operator / denotes integer division; that is, the remainder is discarded. In a strict-left-to-right evaluation, there is no …

Member Avatar for Salem
0
432
Member Avatar for vishalkhialani

Hi, I need to use the borland c++ complier for making my college project. I use only linux and I am unable find the compiler. Any help will be much appreciated as I am stuck. cheers, Vishal p.s- Gcc and other compilers are not allowed for the project .

Member Avatar for vishalkhialani
0
523
Member Avatar for scootscoot

I am writing a circular/ring buffer of a specified size. I am struggling with figuring out if my code is working. It compiles and runs with no problem, but I try testing it with print statements and I get confused. Can anyone give me some advice for how to test …

Member Avatar for dkalita
0
146
Member Avatar for priyabalu87
Member Avatar for dkalita
-1
142
Member Avatar for gerbanzo129

Hey i have this homework problem that i can't seem to solve. i have already did the rest of the program but i have to change the output of this program but i can't seem to make it work. the output they want is.. Home Owner Price of Home Seller's …

Member Avatar for necrolin
0
95
Member Avatar for Kombat

You are required to write a C program that accepts two decimal integers, say d and r. You may assume that the first decimal integer d is nonnegative and that the second decimal integer r which represents the radix, will be one of 2, 3, 4, . . ., 15, …

Member Avatar for yellowSnow
0
2K
Member Avatar for TGeorge824

Hi, for an assignment I have to do, we have to made a Stack and Queue, and read data from a file and add to queue and push onto the stack. Well, I made an array implementation of a stack that works fine, but the array implementation of the Queue …

Member Avatar for Dave Sinkula
0
925
Member Avatar for nateuni

My unit doesn't teach this so I am unaware about the correct syntax to go about what I want to do. I have hit google but have produced no answers to my specific problem. So here we go. I have a series of nested structs. Is this possible that instead …

Member Avatar for nateuni
0
527
Member Avatar for tomtetlaw

When I try to compile the Quake 2 Source code from the if Software website, I get this error: ------ Build started: Project: quake2, Configuration: Debug Alpha Win32 ------ Compiling resources... Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1 Copyright (C) Microsoft Corporation. All rights reserved. .\win32\q2.rc(10) : fatal error …

Member Avatar for tomtetlaw
0
103
Member Avatar for Gaiety

can i use statements like: int num; fread(&num,sizeof(num),1,stdin); fwrite(&num,sizeof(num),1,stdout); i tried this and debugged the code the variable is having the correct value. but that is not getting displayed. can't i use stdin , stdout in fread and fwrite.

Member Avatar for codeguru_2009
0
1K
Member Avatar for jhunluis

This program I wrote has the following error: (33,5):Declaration syntax error (64,2):Declaration missing ; [CODE]#include <stdio.h> #include <conio.h> int range1(int a); int range2(int b); int range3(int c); int range4(int d); int main() { int in, ctr, ctr1=0, ctr2=0, ctr3=0, ctr4=0, ctr5=30; for(ctr=1;ctr<=30;ctr++) { printf("Enter %d integer values within 1-200: ", …

Member Avatar for Salem
0
166
Member Avatar for TGeorge824

Hey Guys, sorry but i guess I posted a code snippet when I shouldnt've. That was my first daniweb thread. The program I'm trying to run checks to see if a number is perfect, abundant or deficient. It's perfect if its factors add up to the number(ie 6 = 3+2+1), …

Member Avatar for yellowSnow
0
96
Member Avatar for rajesh.hck

Hey guys, I am new to C++ coding. Can anyone help me and tell me how can I get a C++ Compiler free for study purpose.

Member Avatar for dgr231
0
102
Member Avatar for hoke

Using \x I can specify hexadecimal numbers in strings in C, but if I put \x00 then it interprets it as an instruction to terminate the string. As a result I can't express a hexadecimal number with 00 in it using a string! Is there some way around this?

Member Avatar for Ancient Dragon
0
619
Member Avatar for chathu12

Hello every one. I coded a program to seperate words from a file and want to input each seperated part to an array.But it doesnot work.Please help me!! Here is the code [code]#include<stdio.h> #include <string.h> #define max 100 int main() { FILE *f; char data[128]; char *p; int host=0; int …

Member Avatar for dkalita
0
164
Member Avatar for Samyx

Hi everyone, this is what I have to do: The method [code]makeWordList (char *fileName)[/code]. this method will take in a file name, read from the file and identify the words in the file. These words should be stored in a global array for use in the next method. The method …

Member Avatar for Salem
0
124
Member Avatar for TGeorge824

The program I'm trying to run checks to see if a number is perfect, abundant or deficient. It's perfect if its factors add up to the number(ie 6 = 3+2+1), deficient if the number is greater than the factors, and abundant if the factors add up to more than the …

Member Avatar for TGeorge824
0
104
Member Avatar for bernadlosini

The question given like this using the CreateProcess () in the Win32 API. In this instance, you will need to specify a separate program to be invoked from CreateProcess(). It is this separate program that will run as a child process outputting the Fibonacci sequence. Perform necessary error checking to …

Member Avatar for Sameer.coder
0
974
Member Avatar for suutukil

please do help me the program goes like this; #include<iostream.h> void main() { int x; int no[10]; cout<<"input 10 numbers"<<endl; for(x=0;x<=9;x++) cin>>no[x]; for(x=0;x<=9;x++) cout<<no[x]<<endl; } but i have to get the sum 0f the 10 numbers in ascending order this the outtput example: 1+1=2 2+2=4 3+3=6 5+5=10 4+4=8 i have …

Member Avatar for mrnutty
-1
156
Member Avatar for sacredmaiden

Hi everyone, i'm new here, and also new in InfoTech education (i'm a freshman student) I don't really know what's the exact word for it, so it's pretty hard for me to search it in this forum but.... can anyone help me out? how can i use WHILE in reversing …

Member Avatar for Sameer.coder
0
119
Member Avatar for suutukil

Please help me with my assignment in c++! Write a program that will input 10 numbers and display the sum in a ASCENDING ORDER. please help me i really need this badly...

Member Avatar for suutukil
0
623
Member Avatar for vivekarora

Hello Friends, We have a known problem in our hands: Allocate some memory, and get a pointer to that memory. Now, no one stops this pointer to perform memory overrun or underrun(i.e. writing before the allocated memory). I wish to implement 2 functions as MyMalloc() & MyFree(). When I use …

Member Avatar for vivekarora
0
209
Member Avatar for OneDreamCloser

hi all , i hope you can help me with the following : in types.h : [code=c] /* Structure of input buffer for each switch */ typedef struct InputBuffer *InputBufferPtr; typedef struct { struct List **fifo; /* Input fifos: one per output. */ void *traffic; /* Placeholder for traffic stats …

Member Avatar for Salem
0
135
Member Avatar for Grn Xtrm

Hello friends. I'm very new to C and am still learning how to do basic stuff. I got the code to work in C++ (which I'm much more fluent in) but I'm having trouble converting it to C code. [code=cpp] #include <iostream> using namespace std; double factorial( int n); int …

Member Avatar for Grn Xtrm
1
202

The End.