19,876 Topics

Member Avatar for
Member Avatar for ireimaima

Hi..can anyone help me..debugging my codes.. when i compile and run it.. i dont get the accurate result..of sum and avg..can anyone help me telling where is the error?? thanks so much.... Here are the codes: #include <iostream> void getNum(int& num,int& sum); void doProcess(int num, int& sum, float& avg); void …

Member Avatar for ireimaima
0
2K
Member Avatar for techevo

Hi all, I am having a problem printing out the elements of an array, using a for loop. when i try to print out each individual element, it prints out the last element repeatedly. ie will print the last element of the array, over and over again. if you could …

Member Avatar for Narue
0
85
Member Avatar for madmax007

Hi, I am trying to write some code in order to communicate with a telnet clent from a c++ application. My idea was to open a telnet session with popen and to use the input/output pipes to communicate but it does not seem to work. When I test, the program …

Member Avatar for madmax007
1
1K
Member Avatar for capsown

Hi I need help with some C++ code. It's pretty basic, but my teacher will not help me. He keeps saying "Just one second, I'm helping someone else." And then forgets about me. It just gets frusturating. The code is very undeveloped though, I'm just trying to get all the …

Member Avatar for Salem
0
207
Member Avatar for bhavnam66

program using nested loops in c programming language to generate following pattern zyxwvwxyz zyxwxyz zyxyz zyz z

Member Avatar for Salem
0
100
Member Avatar for iamcreasy

This code is supposed to print all the numbers from a text file...but for some unknown reason, it is only printing the last pair. [CODE]#include<stdio.h> int main() { freopen("in.txt", "r", stdin); int result=0, column=0, row =0; while(scanf("%d %d", &row, &column) != EOF); { printf("%d %d", row, column); } return 0; …

Member Avatar for iamcreasy
0
205
Member Avatar for replicajewelry

I am new in this forum, I was really fond of developing the graphical applications in C when I was earning my Computer Sciences Degree. But due to lack any guideline could not make progress in C. Even now I am working in some Marketing firm. But I can say …

Member Avatar for iamthwee
-3
88
Member Avatar for desier
Member Avatar for gerard4143

What is going on here. Copy this C code , compile and run. What do you think is going on? Note I don't want the answer, I know what's going on here. This is just something for the rookies to play with... Also this is not the best way to …

Member Avatar for jonsca
1
114
Member Avatar for Hofik

Hello everybody. I have to make "an-OCR-like" programm in C - it gets for example this to stdin: [CODE] *** *** *** * * * * * * * * * * * * * * * * * * * * * *** *** *** * * * * …

Member Avatar for Hofik
1
87
Member Avatar for nokia3315

Project of C programming Write a program that helps the user to consider a range of interest rates for a mortgage over 20, 25, and 30 years. Prompt the user to enter the amount of the loan and a minimum and maximum interest rate (in whole percentages). Then write a …

Member Avatar for Nick Evan
-11
247
Member Avatar for ejazmusavi

Hi I have project which involve a database and a folder in which i will store the images which paths are stored in database. When i make a setup copy of my project and run it gives the following error. COULD NOT FIND FILE 'C:\DOCUMENT AND SETTINGS\ADMINISTRATOR\ISO.mdb' while i have …

Member Avatar for sknake
0
347
Member Avatar for master_ref

:);) please !!![code]// if u is greater than v then the greatest common divisor of u and v // is the same as the greatest common divisor of v and u - v. // This observation leads to the following implementation in C: #include <stdio.h> int gcd(int u, int v) …

Member Avatar for WaltP
0
104
Member Avatar for zydaru

Hello, I have a tiny problem with my c# application, the short version : not all windows users can see it. Long version: 1. I created my c# application, and it works, no problem there. 2. I published my application and I obtained my setup files. 3. I started the …

Member Avatar for zydaru
0
130
Member Avatar for strlen

please help me ,check the program . if input the text like this "nice to meet you",the output right,no problem,but if input "nice to meet you too",the result is "nice meet you to",how should i do? [CODE]#include"stdio.h" #define n 100 void del_char(char str1[n],char str2[]) { char str[n],*p1,*q,i,j; p1=str1; q=str; *q=*p1; …

Member Avatar for Ancient Dragon
0
111
Member Avatar for Sin-da-cat

Can somebody help me with this? I'm not sure if this is the right forum section, so if it's not, please let me know. The problem goes like this: I need to create a program that has a recursive function which checks whether or not the given string is a …

Member Avatar for farooqiumar
0
2K
Member Avatar for Dave Sinkula

Several methods of reversing the bits of a byte are presented here. [i]Note that not all of the methods are portable.[/i]

Member Avatar for Dave Sinkula
3
770
Member Avatar for mueed

can any1 tell me how to display a array of pixels into a gray image using c

Member Avatar for Salem
0
94
Member Avatar for asha SSIT

how can we sort the alphabets using pointers in c can anyone help me please.....

Member Avatar for Nick Evan
0
50
Member Avatar for mustafaneguib

ok guys, i can not figure out the following problem that i faced just a while ago while trying out some filing in c++. the code is as follows: [code=c++] #include<iostream> #include<fstream> #include<string> using namespace std; int main() { ifstream readFile; readFile.open("Input.txt"); string sample; readFile>>sample; cout<<"Here is a line: "<<sample<<endl; …

Member Avatar for Nick Evan
0
365
Member Avatar for xavier666

I was making a DEQUE program utilizing two separate lists for forward and backward traversal. But what I think I've done is ended up making [U]two separate lists[/U], having same data but only their [U]order reversed[/U], thus wasting memory :'(. So what I want to know is this how a …

Member Avatar for Narue
0
173
Member Avatar for coolcool

can anyone suggest how to write a notepad app using c??algorithm for programming is needed..gui is not so important..graphics in c enough..i just need the idea of what to do..pls help me...

Member Avatar for Ancient Dragon
0
91
Member Avatar for Gaiety

I am writing a program to create a window and a box in which the statements are printed but i am unable to get the correct out put. some times after executing the program its showing the commad line but what ever the commands i enter are not visible at …

Member Avatar for Salem
0
132
Member Avatar for Pamilerin

How can one make a program repeat a set of lines of code.like for example [CODE]printf("enter the value of x:"); scanf("%d",&x); for(i=0;i<1;i++){ value+= arr[i]*(x,i); printf("\n The value of the polynommial is %ld",value); }[/CODE]

Member Avatar for Nick Evan
0
77
Member Avatar for rmawatson

Hello, I was hoping someone might be able to clear up some questions I have on casting Objects vs Casting Pointers in C++. The first example below is compilaining that the constructor of XDeviceMotionEvent cannot construct a new XDeviceMotionEvent object from an _XEvent&. What I dont understand about this is …

Member Avatar for Narue
0
245
Member Avatar for Iam3R

As far as my understanding and other referals i understood that when the address of a local variable is returned the first call using this address may print the correct value but if it is called after any other function may get undefined values. but my program is returning the …

Member Avatar for Tajon Wong
0
364
Member Avatar for serra01

Well, I am impress to this Forum and I also want o say that In "C" programming , Pointer topic and the use of it totally useless. I am a diploma holder that's why I am saying this thing. Thanks for accepting my thoughts guys. ==================================== link snipped

Member Avatar for WaltP
-5
73
Member Avatar for johndoe444

Hi how is the typedef for monthTable working while the statement at line 6 not working? [CODE]#include <stdio.h> typedef const char * monthTable[3]; // uncommenting the following generates compile error //int[5] A; int main() { monthTable t1,t2={"Jan","Feb","Mar"}; int i=0; for(i=0;i<3;i++) { printf("%s\n",t2[i]); } return 1; }[/CODE]

Member Avatar for Narue
0
80
Member Avatar for cthoes

i couldnt understand how fseek(fp,-size,SEEK_CUR) helps to allocate the modified data at the location where name are found to be same. it would be great help how fseek points to the location where data is going to modified. -size if fseek logic of pointing to the location where to modify …

Member Avatar for WaltP
0
116
Member Avatar for UtaChan

I am studying in college and got stuck with an excercise in my book, should be simple but I insist of making life hard :p Mission: My code was sopoused to take a binary number with use of functions I have recently learned and mve all the digits to the …

Member Avatar for Narue
0
228
Member Avatar for daudiam

ptrdiff_t is signed, while size_t is not, but both can safely hold the address of a pointer. How is it possible when half the possible values of ptrdiff_t will be negative, so its capacity must be half of that of size_t when it comes to storing pointers, as pointer adresses …

Member Avatar for Narue
0
271
Member Avatar for Derp2000

Hello there. :) I tried all day yesterday to figure out what was wrong with this code so I thought I'd ask here. I have to write a program that duplicates a 24-bit (RGB) bitmap file while also inverting the image. The only problem seems to be copying the pixel …

Member Avatar for Salem
0
155
Member Avatar for sweetanimeshrcc
Member Avatar for jezareal

Hi. im just quite new to c program and i need help on who can give me the source code. This is about Interval search method or OSM in numerical method analysis. The program should solve a given equation f(x) example: f(x)= x^2+2x+3 Given the function f(x)=0 (this would be …

Member Avatar for Dave Sinkula
-3
259
Member Avatar for harryhaaren

Hey all, Slight continuation on[URL="http://www.daniweb.com/forums/post1092017.html"] this thread.. [/URL] Not essential though. Hence the new thread. The problem is that when I declare a [icode]static[/icode] attribute of a class, and later try using it in a static member function , I get a compile time error. The problem: (with code) OscServer.hpp …

Member Avatar for harryhaaren
0
165
Member Avatar for sree_ec

I have a general doubt regarding passing pointers to functions... Suppose i have variable [code=c]tc_struct *ptr;[/code] and i want to pass it to a function to fill it. So i passed it [code=c]func(&ptr);[/code] and i received it in func as [code=c]void func(tc_struct** ptr1)[/code] Now again i want to pass this …

Member Avatar for Narue
1
343
Member Avatar for daudiam

There is a rule about sequence point that goes like this. "Between the previous and next sequence point an object shall have its stored value modified at most once by the evaluation of an expression. Furthermore, the prior value shall be accessed only to determine the value to be stored." …

Member Avatar for Narue
0
99
Member Avatar for daudiam

I think getch() is the most primitive input function of C, on which getchar(),etc. are based. What may be happening is that getchar() uses getch() to take input, and keeps buffering it till getch() returns 26 (ascii for ctrl+z, which indicates the end of input in Windows) is encountered. It …

Member Avatar for nezachem
0
149
Member Avatar for daudiam

size_t is defined as "size_t type is a base unsigned integer type of C/C++ language. It is the result of sizeof operator's execution. The type's size is chosen so that it could store the maximum size of a theoretically possible array. On a 32-bit system size_t will take 32 bits, …

Member Avatar for Dave Sinkula
0
196
Member Avatar for Gonbe

Hello. I'm writing a program in C that should ask for a line of input, and extract the process name and parameters. This doesn't have to be totally bulletproof at this point. An example input could be: "Hello these are parameters". On this example "Hello" would be the string i …

Member Avatar for Dave Sinkula
0
2K
Member Avatar for Ugaton

guys got some problems with regards to c# programming im new with this one.. my problem is displaying 5 integers or numbers that is having a 3 spaces in between the numbers.. want some of your codes.. thanks a lot guys... Happy new year

Member Avatar for ddanbe
0
106
Member Avatar for SecurExpert

someone please help me out on this linked list code. it seems not to work out. it is sort of a doubly linked list. look it out. [CODE] #include<stdio.h> #include<stdlib.h> int count = 0; struct node_ptr{ int value; int no; struct node* back; struct node* next; }; struct node_ptr* root; …

Member Avatar for Salem
0
117
Member Avatar for swathi430

in my project if a student gives login and password he should get the details of the student as well as placements detalis which we put the database in some files

Member Avatar for Salem
0
35
Member Avatar for xavier666

I just made a 'Hello World' program [code] #include<stdio.h> int main() { printf("Hello World\n"); return 0; } [/code] [code] exe file size = 15.5 KB Source file size = 79.0 B [/code] Then i made a data structure program (implementing stack, queue, deque) [code] exe file size = 21.9 KB …

Member Avatar for xavier666
1
176
Member Avatar for astropirate

Greetings all! I have a question which after hours of googling i could not find an answer to. In a winsock enviroment, how does one get the udp packet's checksum from the header? thanks!

Member Avatar for astropirate
0
66
Member Avatar for Iam3R

Hi , so far i have been concentrating on programming aspects. now its time to learn some internals of C -compiler. Lexical Analyzer Parser Hashtables Syntax Checkers Expression Evaluators Symbol table : etc please share me some info related to symbol table what are the contents of the symbol table …

Member Avatar for Iam3R
0
166
Member Avatar for _Michael_

Hello, I am making a console application for a window home computer. The application will search for factors of a number that the user enters. Everything works fine up to about [10^10 = 10000000000]. I am unsure if C++ has a maxium number allowence. If this is the case can …

Member Avatar for WaltP
0
129
Member Avatar for reyarita

hey guys! do you have idea how to print a * and in a square symbol like this ***** * * * * * * ***** i have my code in here but it didnt follow like that

Member Avatar for jonsca
0
155
Member Avatar for john butler
Member Avatar for Narue
0
159
Member Avatar for cthoes

[CODE] while(1){ system("clear"); gotorc(10,30); printf("\n1. add records"); printf("\nyour choice"); fflush(stdin); choice=getchar(); switch(choice) { case'1' : fseek(fp,0,SEEK_END); another='y'; while(another=='y') { printf("\n Enter name, age and basic sal"); scanf("%s%d%f",e.name,&e.age,&e.bs); fwrite(&e,stsize,1,fp); printf("\n add another record(y/n)"); fflush(stdin); another=getchar(); } break; [/CODE] [QUOTE] hi friends i am working on one menu driven program and used …

Member Avatar for WaltP
0
271

The End.