19,876 Topics
![]() | |
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 … | |
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 … | |
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 … | |
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 … | |
program using nested loops in c programming language to generate following pattern zyxwvwxyz zyxwxyz zyxyz zyz z | |
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; … | |
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 … ![]() | |
| |
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 … | |
Hello everybody. I have to make "an-OCR-like" programm in C - it gets for example this to stdin: [CODE] *** *** *** * * * * * * * * * * * * * * * * * * * * * *** *** *** * * * * … | |
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 … | |
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 … | |
:);) 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) … | |
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 … | |
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; … | |
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 … | |
Several methods of reversing the bits of a byte are presented here. [i]Note that not all of the methods are portable.[/i] | |
can any1 tell me how to display a array of pixels into a gray image using c | |
how can we sort the alphabets using pointers in c can anyone help me please..... | |
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; … | |
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 … | |
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... | |
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 … | |
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] | |
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 … | |
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 … | |
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 | |
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] | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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." … | |
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 … | |
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, … | |
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 … | |
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; … | |
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 | |
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 … | |
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! | |
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 … | |
![]() | 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 … |
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 | |
Basically what is the system level difference between language C and C++ ? | |
[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 … |
The End.