19,876 Topics
![]() | |
hi i am not getting pointers concept.guide me to learn this concept.i can't understand the increment and decrement of pointer variable. And maximum how many dereference operator you can apply in while declaring a pointer variable. reply me asap | |
I'm doing this minesweeper assignment and I need help. I tried to test the findMineValues() function and it completely scrambles up my board. Can someone help me pinpoint what I am doing wrong? [CODE=cpp] #include <string> #include "Cell.h" using namespace std; Cell::Cell(){ label = 0; mine = false; flag = … | |
Hi all. I wrote a small sequence to read data into a dynamic array of structures, which seems to work just fine so far as I can tell. Unfortunately a friend with somewhat more experience than I do pronounced it 'hairy,' but wasn't good enough to explain why. I'm simply … | |
HI.. i am implementing a method for password strength detection. how can i use dictionary in linux system. is there any dictionary searching method. plz.. give me reply.. regards.. | |
hellow everyone, can u please help me.... just a code fragment in C... the program is designed to add fraction... the user should input like this: enter the fraction to be added: 1/2 1/4 the answer is: 3/4... tnx... :) | |
I have an assignment I'm working on in C but I didn't want to ask for any code specifically. I just wanted to ask about the methods to use. The program reads a text file where it tells you the number of values to hash. The hash function is completely … | |
hi... plz solve this .. actually binary search takes two tests inside the side the loop . Now i want with one comparison inside the loop. [U]Question is[/U]: [B]Our binary search makes two tests inside the loop, when one would suffice (at the price of more tests outside.) Write a … | |
I am trying (unsuccessfully!) to code the game of life for an assignment, I am very new to C programming and am finding it very difficult. I am at the part where the program needs to count how many cells are live/dead and I thought it would be a good … | |
can any1 solve this .....Given a sorted list of infinite size in which first n elements (n is unknown) are finite integers and rest are infinity, write an efficient function that finds a given number in O(ln n ) time complexity. | |
I am not too sure about c++. I have this program so i can perform a test on it against java. It looks like [CODE]#include "stdafx.h" #include <iostream> #include <math.h> #include <sys/time.h> using namespace std; double generate(int max) { struct timeval start; struct timezone tz; gettimeofday(&start, &tz); bool *sieve = … | |
help needed..... i trying to write a c compiler in java but im a newbie in compiler design....... i know the phases of compiler is there any classes in java for implementing these phases?????? is there a source code for c compiler written in java?????----open source thanks in advance | |
Hey so heres a simple program I'm making that has to calculate a number from different inputs by the user. It worked for a bit, but now when executed the command prompt screen comes up but its blank, then I try to close it and it stops responding. Then when … | |
Hello - I have a question about inheritance and polymorphism in C++. If one is making heavy use of inheritance and using a lot of pure virtual and plain virtual functions, are there any common practices for avoiding having the virtual functions staggered in confusing ways. By that I mean … | |
hi everyone..... how to create a c compiler using c language.... can anyone explain the steps involved..... thnx in advance | |
how to use push and pop here??? thanks! #include<stdio.h> #include<stdlib.h> void push(char palindrome[20], int *top, int value) { if(*top<=10) { palindrome[*top]=value; *top++; } else { printf("Stack is full!!"); exit(0); } } int value; void pop(char palindrome[10], int *top) { if(*top>=0) { value=palindrome[*top]; *top=*top-1; } else { printf("The stack is empty!!\n"); … | |
Hey everyone, So, for a class I am taking, I am building a Lego robot whose main function is to drive around a room and collect data (via a sonar sensor) as to where objects are in its surroundings. Some of the data I will collect is: Current robot position, … | |
I have a problem of interfacing 2 systems of different manufacturers.While one system sends data in 32-bit floating format,the other system understands data only in integer format(16 bit ,32 bit etc).my problem is to convert the 32 bit float data to integer format that can be recognized by 2nd system(its … | |
Hi! I need to find out the size of an arbitrary file and then binarize it in C. I can do this with txt files, but how could I generalize it? This is how I get the size: [code] const char* filename = argv[2]; ifstream messageFile(filename); beginFile = messageFile.tellg(); messageFile.seekg … | |
could anyone help me with the code to extract a matrix from a file? i would also need to be able to know the dimensions of the matrix i am extracting. thanks in advance | |
I have written the below code in C ,the problem I have one proccessor and I am not sure if it will work, [code=c] /*#include <stdio.h> #include <stdlib.h> required for randomize() and random() #include <conio.h>*/ #include <stdlib.h> #include <stdio.h> #include "mpi.h" #include <math.h> //int N = 8; /*typedef struct { … | |
im not sure if this is the right place to post this doubt.. i have installed this cint interpreter 5.15 think is i dont want those many options and i want to reduce it to the bare minimum...but the thing is im not very strong in c/c++ and this whole … | |
What is enumeration? What is the difference between call by value and call by Referance? With examples? | |
Hi all, consider the below code snippet: struct ips { int i; }; struct ips * ipsptr; int * ptr; ipsptr = (struct ips * ) malloc(sizeof(struct ips)); ptr = ipsptr; free(ptr); what is the effect of the code above? Does it cause memory leak? Please suggest how it happens … | |
[B]i research a code, and it goes like this:[/B] [code=c]include<stdio.h> #include<conio.h> void main() { int a[12],b[12],c[12],i,j=0,k=0; clrscr(); printf("Enter 12 numbers\n"); for(i=0;i<12;i++) { scanf("%d",&a[i]); } for(i=0;i<12;i++) { if((a[i]%2)==0) { b[j]=a[i]; j++; } else { c[k]=a[i]; k++; } } printf("The even numbers are\n"); for(i=0;i<j;i++) { printf("%d\n",b[i]); } printf("The odd numbers are\n"); for(i=0;i<k;i++) … | |
Hello guys, I'm new to this forum so let me know if there's something wrong with my message. I've recently bought a new computer: [Windows XP SP3 x32, Intel(R) Core(TM)2 Duo CPU, E7400 @ 2.80GHz, 1.60GHz, 2.50GB of RAM, Physical Address Extension]. After installing Turbo C 3.0, I tried to … | |
I'm studying sequential set representation, and one of the only lines in the code that i cant figure out is this [code=C] #define MAX(a,b) (((a) > (b)) ? (a) : (b)) [/code] i get that MAX if a function with two operators, a and b but i dont really understand … | |
Hi, i want to read some lines to an output text file in a loop. My problem is, that i want to start clearing the text file and then append to it in a loop. At the moment i use: ofstream file; file.clear(); file.open("book.txt", ios::app); for (map<string,Person>::const_iterator it = adrbook.begin(); … | |
I’m actually going crazy. After spending a lot of time working on Decision making (if-else, switch and …), I really cannot figure out the basic difference between iteration and decision making. In some problems, the tutor asks us to use “While” loop and “break”, instead of “if-else” and it makes … ![]() | |
[B]cannot convert parameter 1 from 'char' to 'char *'[/B] calcCharges(type_of_gas, &rate_of_gas, number_of_gallons, &total_gas_of_price, car_wash, &price_of_car_wash, &total_cost); | |
I'm still generally new to C, I understand most basic concepts, and were now starting to learn much more complex tasks. Right now im stuck on a program to add polynomials, using linked lists. My book Data Structures - An Advanced Approach Using C, is a real difficult read, and … | |
Hi i have a requirement where a cpp file should load a dll viz gzip.dll.then the cpp should call few methods in the dll.well im able to call the methods with no parameters but im unable to call the methods with parameters.if im trying to call methods with parameters i … | |
hey how to make an object move in an C graphics program, eg; i have drawn a swing and i want it to move... i am beginner in C graphics program so please help me...:( | |
Hi guys, i'm working on trying to pass commands from the console from one program to another program by using pipes() and the execve() system calls. I'm pretty much stuck right now, because I can't seem to determine what i'm doing wrong. Here are my code listings [code] #include <errno.h> … | |
uhm, i really need help on recursion problems, and the first problem before my assignment is me because i really dont know how to do it, or how to construct it successfully... this is my assignment: a program that will read 10 integers,display them as inputted and in reverse order, … | |
print the decimal, octal and hexadecimal values of all character between the start and stop character entered by user, For example, if the user enters and 'a' and 'z', the program should print all the character between 'a' and 'z' and their respective numerical values. make sure that the second … | |
hello...i am new here and also new in IT enviroment, try to do my assignment as below Write C program that accept a character using scanf () function,if the character is lowercase letter,convert to uppercase letter and display the letter in its uppercase form, if the character is uppercase, convert … | |
im writing a calculator programme for my project. But i dont know how to find Tan, Cos, Sin. Any one can help I would appreciate that. what is the formula | |
Hi I am new to c programming language, I have written this small code and I dont know why cant i use the free() here, any clarification highly appreciated. [code=c] int insert(element **head, int d) { element *temp; temp = (element*)malloc(sizeof(element)); if(temp == NULL) { printf("\nError: Failure to allocate memory\n"); … | |
hie im Rupali im doing my final yr project using IVR for car dial. I have no idea from where to start. Can someone please help me how to write code and how to write it in C. | |
I've been working on a program and have hit a roadblock. I know conceptually what to do, but I'm having trouble implimenting it. Ok, so what it's suppose to do is take them randomly generated numbers that have been put in arrayints and factor them. This right now for an … | |
hi, there...ive come up with these codes and they work.but i dont know how to modify the program so that it prints sequence of asterisks in a single line based on the input gained using : 1.while 2.do-while 3.for please help... #include <stdio.h> int main() { int x; printf("Enter an … | |
how to add graphics library to Turboc++5.0 so as to run functions like circle(x,y,r); I am using XP sevice pack2. Plz help me. thanks in advance | |
i'm having error while compiling my code.. key_c_xor = userKeyArray[t]^C[i]; long long int key_c_xor[8]; int userKeyArray[4]; long long int C[36]; the error that i got was: error C2109: subscript requires array or pointer type anyone know how to fix it? thanks | |
Hi, The clock synchronization program below needs to be amended to add another clocksync.ini option to allow the progam to run just once and then terminate. Request you to please give your inputs for this. Thanks, Marconi. -------------------------------------------------------------------------------------- [code]#define WIN32_LEAN_AND_MEAN #define _WIN32_WINNT 0x0400 #include <windows.h> #include <winsock2.h> #include <stdio.h> #include … | |
I have started with simple c# mail application, to send message from one computer to the other, which are connected by LAN. My question is: how to define addresses, or mailmessage.from and mailmessage.to. I have tried with their addresses, but nothing... Pete | |
Hi, Can you please help me what changes are required in an already existing Clock sycnchronization Program in C to add a txt.ini option in it which allows the progam to run just once and then terminate. Thanks. Marconi. | |
Hello! I was having trouble with this program i keep getting undeclared identifier errors for my seat array and my seatnumber variable. I was also wondering if i was going about writing this program the right way. Arrays are kinda new to me. This is the problem (Airline Reservatins System) … | |
# include “udf.h” /* definition variables LTIME =local time, SMER=standard meridian on which local time is based (in degrees), LMER= meridian of the observer (in degrees), N = nth day of the year*/ #define LTIME 12:00 #define SMER 116.25 #define LMER 123.44 #define N 173 DEFINE_PROFILE(heat_flux, t, i) { Real … | |
How do this Print the decimal, octal and hexadecimal values of all characters between the start and stop characters entered by a user. For example, if the user enters an a and z, the program should print all the characters between a and z and their respective numerical values. Make … | |
Hey Im already generating numbers correctly from 0 to MAX_INT. But Id like to know how can I change that range (including negetive numbers) And while already on the subject, why does this code only generate numbers in the VERY high 90s? [code] int main() { int array[100]; srand(time(0)); gen(array); … |
The End.