210 Topics
|
|
# we are assigned to develop a c++ program that accepts a list of a maximum of 100 voltages as input, determine both the average and standard deviation of the input voltages, and then displays the results. There are still errors and it says it requires array or pointer type. … |
|
# Develop a c++ program that accepts a list of a maximum of 100 voltages as input, determines both the average and standard deviation of the input voltages and then displays the results. # ## step 1 : requirements : an average, standard deviation step 2: develop solution: the input … |
|
Hi, I seem to be having a problem with my code below, which I would like to be able to use to return 2 values from the result of a quadratic equation operation. The eReturn function takes care of negative square root values. I'm not getting any errors back, just … |
|
Im getting errors that i don't understand how to fix, any help would be greatly appreciated! >C:\MinGW\bin\g++ -pedantic -Wall -Wextra A9COPY.cpp -o A9COPY.exe A9COPY.cpp:36: error: expected constructor, destructor, or type conversion before '*' token A9COPY.cpp:44: error: expected unqualified-id before "void" A9COPY.cpp:44: error: expected constructor, destructor, or type conversion before "void" … |
|
Hey guys, So I've thoroughly gone through the topics by searching this site but I couldn't find something which can help me. I'm making a task for my friend and let me tell you that it's been a year or more since I've used C++. I've moved on to C# … |
|
typedef struct zoz { int age; int mag; int suly; } nevsor_t; int olvas(nevsor_t * pnevsor) { return scanf("%d %d %d", &pnevsor->age, &pnevsor->mag, &pnevsor->suly); } int kiir(nevsor_t nevsor) { return printf("%d year\t%d cm\t%d kg\n", nevsor.age, nevsor.mag, nevsor.suly); } int sort_age(const void *a, const void *b) { struct nevsor_t *ia = … |
|
(I'm a Computer Science 101 student writing programs in C on a virtual Linux machine.) Suppose I wanted to apply a single (arbitrary) function to every element of an array, one at a time. Doing this once is easy enough, but I'd like to find a method that could accomplish … |
|
Hi I'm having problems with the code in that everytime it iterates it replaces all the values of SendBack with the newly read in values from fgets! FILE *fp; char FileLoc[] = "123456-12345678.txt"; char *SendBack[10]; fp = fopen(FileLoc, "r"); if (fp != NULL) { int x=0; while (fgets(BUFFER,20,fp)) { SendBack[x] … |
|
Im having some trouble putting together a linked list implementation of a queue. I'm getting a segmentation fault, which I believe is due to my empty() function because in an attempt to fix my empty() function, I made it determine empty based on (current_size == 0) instead of (front_p == … |
|
I do have 2 structures here. main linked list is the word. each node of the word list do have a meaning typedef struct node{ char word[20]; struct node2 *meaning; struct node *next; }word; typedef struct node2{ char meaning[100]; struct node2 *next; }means; My problem now is I can't add … |
|
How to write a program use pointer on array that needs eleven numbers, compute their average and find out how many numbers are below the average?. |
|
I have an array of structs that contains an account number and a balance. I open a file which contains an account number and an amount that needs to be either added or subracted from the correct account. My problem is it is adding and subracting to the first account … |
|
I think I am getting bad data because I have my pointer doing the wrong thing, I just don't know exactly how to fix it. Any help is greatly appreciated! output: Number: 4669840 Name: Value: 3.76441e-039 Number: 4218312 Name: Value: 6.52879e-039 Number: 2686408 Name: Value: 6.52879e-039 Number: 128 Name: Value: … |
|
I'm trying to read information from a text file and populate an array of structs using a pointer. I keep getting an error and I'm not sure how to fix it. Any help, comments, or tips are greatly appreciated! Thanks in advance for your time and help! error: request for … |
|
I'm having a little difficulty, trying to transition from c++ to objective-c. I tried to write a fairly simple Fibbonacci sequence computer, which I usually write to familiarize myself with new languages. Unfortunately, it doesn't work. I keep getting errors related to either comparison between an int and a pointer, … |
|
#include <stdio.h> main() { char *s1, *s2; printf("Enter string 1 :"); scanf("%s", s1); printf("Enter String 2 :"); scanf("%s", s2); printf("%s\n%s", s1, s2); } The output of 1st string is right and the output of 2nd string is wrong (i.e. (null)) Can any 1 explain what is going behind? |
|
The Kensington Presentair isn't the smallest 'laser pointer' on the planet, measuring in at 60mm x 70mm x 210mm and weighing 25g. Nor is it the cheapest with that $69.99 price tag. However, most of all it isn't just a laser pointer and thinking of it in those terms is … |
|
i want to take the 1st argument from commandline, ie argv[1] and assign it to a `char target[80]` i know im making some very stupid beginer mistakes... but just cant understand what :( this is my code: #include <stdio.h> #include <string.h> void converge(char *targ, char *src); int main(char *argc[],char *argv[]) … |
|
Hey all, this is a pretty basic program that will take a use submitted array and call functions to find the max,min and then a function to reverse the array. I have the first two functions written and working but I am having trouble with the reverse array function. The … |
|
Can someone tell me how to write ` void readBinaryTree(BinaryTree *&p, ifstream &fin) {` in C ... `void readBinaryTree(BinaryTree **p, ifstream *fin) {` `readBinaryTree(&p, fin)` ??? Thanks |
|
plz help me to solve the error in this program : Given programs replaces multiple spaces with only one space... there is no error , but it shows "Segmentation Fault"...whats the issue ????????? #include<stdio.h> int main(void) { char *t="ALOK KUMAR ASHISH KUMAR ANKUSH"; char *c; int n1=0; while (*t) { … |
|
I can't find the bug in my code. The error that pops up says "Expression: invalid null pointer". Visual studio isn't giving me any line to go to or really any help except once I run the program the error above pops up. The weird thing is everything compiles correctly … |
|
evrything was fine until i inserted 100 to 125 lines in code. i am wondering what kv is doing wrong as it is not even printing that version file was opened.. any sort of help is appreciated. files included in the code are given below for reference. proc/version file: ** … |
|
Hi there I have a question about pointers, i have a functions that takes a path to a txt file, extracts whats in it into an array and returns the array. As i understand it you can't actually pass the array, you have to return the pointer to the array … |
|
Hi guys, I'm facing a new problem. Now I'm learning how to send signals to process in order to make them communicate. I was trying to create a process and when this process is created, send a signal to his father... But I had no success. I get a bunch … |
|
Hi guys, I'm learning C and I still don't have some concepts very clear in my mind. I have to create a program that get the values from ARGV[] and puts into a vector: the program would work like that: ./program file1 file2 file3 My idea was to do something … |
|
hey friends i need help once again... i need to know that how to accessing a structure in another function using pointers.i mean when we returning a pointer to the main function we have have the address of the structure.how to use that address to access the structure..pls guys help … |
|
I'm trying to compare the element pointed by an iterator to an integer, but so far i haven't had any luck in doing so. please correct whatever i'm doing wrong. Thank you. vector<int>::iterator y; for (int i = 0;i<n2;i++) { cin>>temp; cnt = 0; y = lower_bound(a.begin(),a.end(),temp); if (*y == … |
|
Hey, iv been working on a fairly simple part of my program but it throws a null pointer exception. The error i recieve is : Exception in thread "main" java.lang.NullPointerException at FillStyle.<init>(FillStyle.java:12) at compiler.main(Builder.java:43 The code causing the error is : public FillStyle(int type) { if (type >= 0) { … |
|
i want to append a node in the linked list when i append this as struct node*p; p=NULL; append(p,1); where function is declared as append(struct node*q int num) i append three node, after this i call the function for counting the node, i get the total no node is 0, … |
The End.