19,876 Topics

Member Avatar for
Member Avatar for dinosaurclover

Does anyone know about doing rfc 1950 deflate and inflate at socket level. The RFCs are very specific about the HTTP headers you need to send, the start of stream flags(CMF, FLG, FDICT) and the ADLER32 checksum at the end of the stream but the explanation of how to assemble …

0
50
Member Avatar for koman

[code=cplusplus] int main() { string name; cout << "Please enter the filename of the encoded message:"; getline(cin,name); ifstream infile; infile.open(name.c_str()); if (infile.fail()) { cout << name << " fail to open." << endl; exit(1); } cout << name << endl; cout << " File successfully opened" << endl; string buffer; …

Member Avatar for VernonDozier
0
150
Member Avatar for nectionplayer
Member Avatar for John A
0
98
Member Avatar for darren2005

Can anyone let me know how I could include a variable within a system command? (This is a win32 project and not an application.) I am using: (some code taken out) [ICODE] system(("set path=%path%;"[COLOR="Red"]+user[/COLOR]).c_str()); system(("set CLASSPATH=.;"[COLOR="Red"]+usertwo[/COLOR]).c_str()); system(("java -Djava.security.manager -Djava.security.policy="[COLOR="Red"]+user+[/COLOR]"\examplepolicy Xsys").c_str());[/ICODE] Thanks in advance!!!

Member Avatar for darren2005
0
578
Member Avatar for Zach101man

Objective: Write a C program that will accept an infix expression from the user, build an expression tree using the algorithm described in class and then traverse the tree recursively three times to produce the prefix, infix and postfix expressions. Notice that the infix expression produced from the tree should …

Member Avatar for ddanbe
0
105
Member Avatar for anny**

hi friendzz !! here is my program giving warning (possible use of 'ch' before the defination in function ) and also not showing correct o/p plz if anyone can help me [ICODE]#include<stdio.h> #include<conio.h> void main (void) { int j; char ch; for(j=1;j<=5;j++) { printf("enter characters from a to e\n"); { …

Member Avatar for ArkM
0
96
Member Avatar for mshefa
Member Avatar for MosaicFuneral
0
249
Member Avatar for Kira71

I got my program to work but it seems it cannot: 1.cant read a file if its only one archive (needs two to be able to read) 2.can only read the first line in a FILE 3.delete function deletes more than one than intended. help are appreciated :) I have …

Member Avatar for Kira71
0
125
Member Avatar for anny**

hello friend z!! give me some idea about : [B]write a program that takes two characters and two integers by using two command program[/B]

Member Avatar for MosaicFuneral
0
99
Member Avatar for atman

Hey guys, Im reading up on pointers and since i dont have a physical teacher, Its abit hard concept to grasp. Could anyone please explain in their own words shortly how they work, I understand that they carry the adress of another variable, and you'd assign this adress with an …

Member Avatar for ArkM
0
80
Member Avatar for RaDeuX

For some reason I'm getting a memory leak error. It's probably from the part where I start to copy the strings and allocate an array of characters, but I have no idea why. I'm using a text file for input data, which is found here: [url]http://puma.deanza.edu/distribute/DeliaG/Fall_2008/CIS15BG/BG_Labs/BG_Lab_6/countries.txt[/url] I appreciate anyone who …

Member Avatar for RaDeuX
0
115
Member Avatar for Undermine

[code] #include <iostream> #include <cmath> using namespace std; int main() {//begin main double hypot(double,double); double base; double height; cout<<"Program to compute the Hypotenuse of a given right triangle. \n"<<endl; cout<<"Enter the base: \n"<< endl; cin>>base; cout<<"Enter the height: \n"<<endl; cin>>height; cout <<"The hypothenus of given triangle is " << hypot(base,height) …

Member Avatar for ArkM
0
105
Member Avatar for mglover070588

Hi , new to the forums:) Trying to do this tutorial from the 'C programming for scientists and engineers' book. The person who wrote it is my lecturer. The program reads the file, but when it displays it, it only shows the last line - I am stuck! I think …

Member Avatar for WaltP
1
234
Member Avatar for jianna

Hello all I'm having difficulty with a program I am writing to reverse the characters in a string. The string contains a sentence where i have to change a character...if it is lower case I have to change it to upper case and visa versa. And this has to be …

Member Avatar for WaltP
0
565
Member Avatar for iamdougsinbox

Hello everyone, This is my first post, I'm having trouble on an assignment. I'm writing a function for a database program in class... I have to write the function that will tranverse a linked list, add a "node" and then write the user entered info into the "node". The first …

Member Avatar for iamdougsinbox
0
100
Member Avatar for Church

I was wondering if i could display multiple colors at the same time in a dos window? i'd imagine it's possible.. don't they do that in those BBS games? Just curious..

Member Avatar for Ancient Dragon
0
68
Member Avatar for LincolnGurl

Hi all, Does anyone know if it is possible to write a C++ macro, which will force the compiler to construct Pascal/custom style string constants during compilation? The basic idea is to avoid unnecessary run-time construction from C-style to custom-style string literals. For example, when evaluating the expression {String2 = …

Member Avatar for LincolnGurl
0
305
Member Avatar for trashed

Hi all. I am attempting my first Gnome applet creation and I found a great tutorial at [url]http://projects.gnome.org/ORBit2/appletstutorial.html[/url] . Unfortunately, I am stuck where the example goes to load an image. I can compile the applet and make it run but when I add it to the Gnome bar it …

0
107
Member Avatar for vadrag

Write program in C that would read 3 figures from the 1 up to the 999 and him it presents all in a line from smallest in biggest.

Member Avatar for devnar
0
99
Member Avatar for indiansoil

Hi, I have decalared a structure named record as given below and also created a function called read() inside the structure. The function works fine when I call it using this statement: myRecord.read(); but I want to create one more function which can be called to initilize all the variables …

Member Avatar for gagansharma
0
247
Member Avatar for shyka

Write a C program to output the product of the the digits that make up the number. example.123=6and1167=42

Member Avatar for gagansharma
0
260
Member Avatar for bemo55

I have a programming assignment for CSCI180. The assignment is to create a recursive function power(base, exponent) that when invoked returns base ^ exponent. Everything compiles correctly and when i run the program i enter the base and exponent like prompted. But then the program stops working and i cannot …

Member Avatar for bemo55
0
528
Member Avatar for SarahYan

Could someone please help me with this? Why is yearofstart value not printed out in the first argument ? I knw there is something wrong, but I don't knw what is it :) Thanks so much. [CODE=c] #include <stdio.h> struct date{ int year; }yearofstart={1950}; struct record{ char *name; char acct_type; …

Member Avatar for SarahYan
0
118
Member Avatar for En-Motion

Trying to write program that counts the number of times a number occurs in an array. The following is the code I have written so far. It doesn't give the correct output though. It seems to be counting the output incorrectly. Any pointers where I could be going wrong? [CODE]# …

Member Avatar for ArkM
0
319
Member Avatar for taylorknox

Could someone please help me im trying to Use the fourth order Runge-Kutta algorithm to solve the differential equation. dy/dx = -y, y(0) = 1 nelow is the program I currently have, and do not know how to corect it, I shouls get altering values of y as x goes …

Member Avatar for ArkM
-1
180
Member Avatar for DanDaMan

Can someone please help me out? What are the pros and cons of C++ and Java? I've always been told that C++ is the ultimate programming language. It's powerful, fast, and used to run huge programs. But since Java is a close rival to C++, I was wondering what are …

Member Avatar for Rashakil Fol
0
135
Member Avatar for atish12

[COLOR="Green"][/COLOR] hi i'm pursuing bca from ignou and i want to be expert in c language . what should i do for this?

Member Avatar for ithelp
0
84
Member Avatar for JpegUser

Hi all, Just a simple question. How do i reverse a pointer to a set of values given that i know the size of the pointer? Eg int *temp = malloc(ptr_size); // values of *ptr let say is 1......100, // if i use the algorithm below, it gets me 1..50...1 …

Member Avatar for JpegUser
0
126
Member Avatar for localp

i want to create a hash table ( independent rehashing ), using STL LIST... in Independent rehashing we use a function to we need to generate the index then check if there is any collisions if there is we need to rehash it and then put it in to the …

Member Avatar for Lerner
0
187
Member Avatar for Andragon

Problem1: When I tried outputting a printf "error message" at dividing by zero, it screwed up my code and no output was shown at all. Problem2: When I perform an operation, I get 8 results instead of 5. Please help ASAP. Thanks. [code=c] #include <stdio.h> //Defining a few "functions" which …

Member Avatar for devnar
0
169
Member Avatar for dampecram

Hello, I'm in the middle of writing a doubly linked list, I have the print in reverse working fine and my insert function working fine, I just can't seem to find what I'm doing wrong with the delete function.. WHen i try to delete the last letter in the node.. …

Member Avatar for devnar
0
181
Member Avatar for ajay.krish123

This program is to print name without using the header files [ICODE] void main() { int i; char far *s=(char far *)0xb8000000l ; *(s+2)='p'; *(s+4)='r'; *(s+6)='i' ; *(s+8)='i' ; *(s+10)='t'; } [/ICODE] please explain the meaning of the line [ICODE] char far *s=(char far *)0xb8000000l ; [/ICODE]

Member Avatar for gagansharma
0
184
Member Avatar for purplehaze13

hi i'm new to c++ and i really would appreaciate it if someone could help me plz! i have to create aprogram to identify palindromes using character arrays and pointers. it shd continue requesting the user for phrases until quit is entered. i have t o use the following: -type …

Member Avatar for ithelp
0
104
Member Avatar for revini

Hi all, Can somebody help me pls. I need to create an array of strings using a set of string pointers. char *name1 = "aa"; char *name2 = "bb"; want to make an array like char *nameall[] = {name1, name2}; But this does not work :( Is there a simple …

Member Avatar for revini
0
112
Member Avatar for BITMAN2124

I want redirect output console program to memory. It can be specified memory buffer, or buffer that I can gert ptr to later. I need to specifiy input and output of program and can do this with tmp file+redirect I/O, but that expensive operations+invloves tmp files. I know redirect output …

Member Avatar for BITMAN2124
0
317
Member Avatar for bondo

I have no clue why this isn't working. The top part that reads into size, shortTime, longTime, and threshold work fine. Down below where I try to do the exact same thing and read into x, i get segmentation fault every single time. It seems to me that everything is …

Member Avatar for Narue
0
150
Member Avatar for hellIon

hey guys i am using miracle c compiler on windows xp.... i am trying to figure out how does pointer to functions work..... i have gone thru many tutorials but all have them failed to compile.... [code] #include <stdio.h> int sum(int x, int y) { return x + y; } …

Member Avatar for Narue
0
136
Member Avatar for ting_ting

this is question and the answer...but i cannot compile it in dev c++ correctly..help me //(a) Get five integer numbers from the user. //( Store the numbers in an array called Number. //© Display all the numbers on screen. //(d) Modify the program so that it prints the reverse of …

Member Avatar for Narue
0
137
Member Avatar for SphinCorp

I am getting a casting error with: [CODE] page_directory[0] = page_table;[/CODE] where [CODE]unsigned long *page_directory = (unsigned long *) 0x9C000; unsigned long *page_table = (unsigned long *) 0x9D000;[/CODE] Note that this is to initialize paging at kernel level, so stdlib.h is NOT an option, as malloc() -- a memory allocation …

Member Avatar for Narue
0
77
Member Avatar for mgirl

Hi, My change counting program runs perfectly except the counters don't return to 0 when I try another number. The change adds up from the first try. Is there any way to fix this? [icode] #include <stdio.h> int main() { int toonie=0, dollar=0, quarter=0, dime=0, nickel=0, cent=0; float amount, change, …

Member Avatar for ajay.krish123
0
295
Member Avatar for atman

Hey guys, Im learning C online, and its hard somtimes to understand the concepts, w/o being in class asking questions. I was wondering hat would be the easiest and fstest way to understand numeric validating(no characters) and could anyone break it in easy steps? im new, but really excited about …

Member Avatar for ajay.krish123
0
120
Member Avatar for PoetGuy

Can anyone show me code snippets on linked lists, double linked lists, circular linked lists or something that deals with them. Plus a bit of reading, id prefer functiong codes and not partial please, this is the way i go about learning. Thanks!

Member Avatar for devnar
0
36
Member Avatar for Nashy

Hello people! I have an homework to compile the fax2tiff program. It will be no problem, but how to try my program, if it work? Because I haven't fax file at home, bec. i haven't fax device. I was searching for long time to find some examples for fax files …

0
57
Member Avatar for mikeregas

This program is suppose to be a spell checking program and I just can not get it to work can someone please take a look and let me know what I need to do to fix it [code]#include <stdio.h> #include <string.h> #include <stdlib.h> //CONSTANTS #define wrdlen [48] #define linelen [1024] …

Member Avatar for ArkM
0
175
Member Avatar for srivtsan

i got the code for this problem but not able to find where i am wrong my problem is as follows Given an array of numbers, find the longest subsequence whose elements grow monotonically: 1 4 8 2 5 7 3 6 => 1 4 5 7 1 4 8 …

Member Avatar for srivtsan
0
145
Member Avatar for tat2dlady

I know there is a way for the user to enter input and be able to accept it without the user having to press the Enter key but I do not know the command. Does anyone here know? For example, I have a menu like this: A Add a record …

Member Avatar for Narue
0
116
Member Avatar for rubentan

hi guys, im using microsoft c# along with sql server 2k8 to build my database software, i have 2 problems.. 1st is i cant seem to make an incrementing primary key that doesnt start with 1? i wanted to make my primary key start from 00001 then increment it by …

Member Avatar for dickersonka
0
87
Member Avatar for yuvaraj.tr

hi gues am new to embedded c,i wrote programm to addition of two numbers but i didn't get the result.... I don't what is the wrong in my code my code is: include <reg51.h> #include <stdio.h> extern unsigned int getnumber (void); extern void output (unsigned int); void main (void) { …

Member Avatar for cikara21
0
87
Member Avatar for atman

Hey guys., i wrote a little program to calculate the foreign exchange of canadian dollar to french frank. but when i validate an input(it has to be between 1 and a 1000), i get a problem even though it makes user to reenter the number, still the very first number …

Member Avatar for bionicseraph
0
159
Member Avatar for asilter

I did not care on warnings. But they put me in trouble lately. When compiler comes to the statement below it gives the warning. [code] /* void ** vpSec00 comes as an argument */ int hSec = 0; size_t nbytes; *vpSec00 = bitio_o_close(hSec0, &nbytes); [/code] it says: warning: assignment makes …

Member Avatar for SphinCorp
0
301

The End.