15,551 Topics
| |
Hello, good afternoon. :) Now I got some problems with my "Create Payroll". I changed the "rate[100]" integer to "salrate[100]" float. After changing these errors prompted me. [b]Errors:[/b] payroll system.cpp(157,22): Illegal use of pointer <-- This is "Error" payroll system.cpp(158,8): Possible use of 'gsalary' before definition <-- This is "Warning" … | |
[CODE]#include<stdio.h> int main() { int i,j,k,c; char s[1000]; //array to store the input string for(i=0;(c=getchar())!='.';++i) //string to be ended with '.' { s[i]=c; for(j=0;j<=i;++j) { if((s[j]==s[j-1])&&(s[j]=='\n' || s[j]=='\t' ||s[j]==' ')) { j=j-1; } } for(k=0;k<=i;++k) printf("%c", s[k]); } return 0; } [/CODE] I am trying to create a program that … | |
| Hey everyone, I'm working on my first program using "[COLOR=RoyalBlue]Winsock2.h[/COLOR]". I'm getting back linker errors "error LNK2001: unresolved external symbol ..." 9 unresolved externals total The program came from an MSDN tutorial: "A simple winsock program", its a simple ping program that sends packets to a loopback address. when I … |
My first post on this forum, long time lurker though. I'm running into a problem trying to search through an N-ary tree. I'm tasked with having the user input pairs of job titles and from there putting them into an N-ary tree, with the higher job titles at higher levels. … | |
I want to write and read a Student struct to/from a file. The program works weird . Sometimes reads 52 elements, sometimes 1 element. I couuld not see what the problem is. Help please. [CODE]int main() { FILE *deneme = openBinaryFile("C:\\text\\text.txt"); Student me = {"Mert","Akcakaya",200611004, 0}; Student you = {"Default", … | |
I am trying to write a program that will take a text file and parse the words into a linke dlist that will be then printed to the screen with a user defined number of characters per line and I am running into some runtime issues with opening and procesing … | |
Hello, I'm trying to work with I2C and I have the following code: [code] #include <stdio.h> #include <avr/io.h> #include <util/delay.h> #include <compat/twi.h> #define I2C_START #define MAX_TRIES #define I2C_DATA #define I2C_STOP #define i2c_writebyte unsigned char i2c_transmit(unsigned char type) { while (!(TWCR & (1 << TWINT))); return (TWSR & 0xF8); } { … | |
Greetings;) I have a conversion program with a combo box miles to kilometres kilometres to miles .... type of thing. I have two labels and two text boxes From: Says what converting from typed in To: Outputs the conversion What I want to happen is the label From to match … | |
Hi, I am reading and understanding code from a book. I am copy pasting the exact code which I have. Following program is for client.c [code=c] #include<sys/types.h> #include<sys/socket.h> #include <stdio.h> #include <sys/un.h> #include <unistd.h>> #include <stdlib.h> int main() { int sockfd; int len; struct sockaddr_un address; int result; char ch … | |
I want to generate 1billion random integer with no duplication, I dont know how do I allocate memory for such a huge amount of data. | |
So I'm doing this stack program , and basically when I try to print the elements in the stack, nothing happens... I'm totally lost : ( , any help would be appreciated. Oh and some function names are in spanish, llena means full, vacia means empty, the variable cuenta is … | |
I am having trouble taking a histogram program I made in class and making it interactive where the numbers are inputted by the user. Any help would be greatly appreciated. [CODE]#include "stdafx.h" #define SIZE 10 int main() { int n[ SIZE ]= {19, 3, 15, 7, 11, 9, 13, 5, … | |
hi i wannt ot make a programe in C inwhich user input current date and date of birth, output shows age in the number of years, months, days, etc., PLease help me!!!!!!!!!!!!!! | |
I have this: [B]foo(cons char *p);[/B] foo not is my function, and I don't have access to your source code. I'm trying use foo so: [B]char val[32]; foo(val);[/B] The result of foo is zero and not the desired string. Other tries: This work: [B]foo("something here");[/B] This don't work: [B]foo((cons char … | |
Hello, Well, this is not a question directly related to programming, so kindly excuse me for that. i have a small doubt regarding endianess and dereferencing of elements This is what i tried: [CODE]#include <stdio.h> int main(void) { int s = 0xFFFFFAFF - 1; int *p = &s; unsigned char … | |
Hello, Can I have a parallelised section of code, that uses x threads, where a function is called to manipulate an array. Each thread's function tries to manipulate the same array at the same time (not in the same location in the array). [CODE][for example, take a 2x2 matrix (x(and … | |
Hello, good evening. :) I'm having a hard time with my "Searching" codes. :( [b]The problem is:[/b] When I try to search the employee number after registering, my program will print "EMPLOYEE NUMBER NOT FOUND". I don't know where's the culprit. :( Here's the whole codes: [code=C]#include <stdio.h> #include <conio.h> … | |
Does any know about make file??? If yes, could you please explain about make file how to create make file and how to use in C,C++??? | |
hi... i'm a newbie to this community of superb IT professionals.. act i'm doing a project in image processing using c and all i wanted to kno is that,is it possible to do the image processing of a colour image without converting it to a gray scale image and then … | |
India win the match. I want to display output as match the win india. Please give me C program for this | |
I've written the code to determine if a year is a leap year or not, reading from a file, and printing to a file, and telling how many years were checked. I'm having trouble figuring out how to convert it to utilizing functions in the program, for the actual calculations … | |
hi.. i'm writing a program where a file contains a set of phonenumbers. when a customer buys a number that particular number has to be deleted from the file. i'm able to delete that number but when the next customer comes that number is still available. even though the number … | |
Hello, i have a small doubt regarding the FILE structure. i looked it up in the header file (i have VC++ 2008). In this implementation, it was declared as: [CODE]struct _iobuf { char *_ptr; int _cnt; char *_base; int _flag; int _file; int _charbuf; int _bufsiz; char *_tmpfname; }; typedef … | |
Hi, I'm fighting a battle with a linked list and I am currently losing. I am using the toolkit, pointers, nodes and a class. My code is still buggy because after building it, it just runs for a while then stops. Please help. Here is what I have, an implementation … | |
Hi, I have a machine with X-Fi Titanium sound card. Im getting the following errors when trying to compile the driver. [CODE] make make -C /lib/modules/2.6.9-89.0.23.ELsmp/build M=/root/XFiDrv_Linux_Public_US_1.00 make[1]: Entering directory `/usr/src/kernels/2.6.9-89.0.23.EL-smp- x86_64' CC [M] /root/XFiDrv_Linux_Public_US_1.00/xfi.o In file included from /root/XFiDrv_Linux_Public_US_1.00/xfi.c:17: /root/XFiDrv_Linux_Public_US_1.00/ctatc.h:22:34: linux/spinlock_types.h: No such file or directory make[2]: *** [/root/XFiDrv_Linux_Public_US_1.00/xfi.o] … | |
Hi friends, I've created program for getting the data members from the structure and pass those variable in a function dynamically. The structure will dynamically change and its members also changing.Now i need to rectify the memory leak problem in this.I declared maximum size of buffer is 30000 when i … | |
I have a working c file which count lines from a text file. Is there a function that filters out lines with comments(lines started with //)? So when I load in a text file with a c code, it only has to count the lines without comment. | |
Hey everybody, here's my assignment. "Program 69: String Pattern Matching – Naïve Approach Write a program that will prompt the user to enter a string of characters. There will be a maximum of 10 characters entered for the string. The program will then ask the user to enter lines of … | |
Error C2057: expected constant expression Error C2466: cannot allocate an array of constant size 0 Error C2133: 'inc': unknown size Why? Here's the code: [CODE] #include <stdio.h> #include <stdlib.h> #include <fftw3.h> static double *rdata = NULL, *idata = NULL; static fftw_plan rplan, iplan; static int last_fft_size = 0; double A[8192]; … | |
Hi all Happy to join this forum, hope you can help me from time to time :) I'm and electrical engineer, and I use C program as part of my work, at a very basic level, just to control a piece of hardware. I now have a problem which I'm … |
The End.