15,551 Topics
| |
Hi Team, I have 2 questions: 1. If I create a DLL using VS 2005 for my application and then use the same DLL in some other machine which has vs 2005 redistibutables, it should work right? Please confirm. 2. I get debug assertion failed on a DLL. What could … | |
hi! i have a program in C++ that produces a right triangle of character and i need the same program, i mean a program that makes the same function, but in C. This is my program in C++ : #include <iostream> using namespace std; int main() { int i,j; char … | |
I'm having trouble with a binary tree algorithm. A test program I wrote calls for the top node to only be altered in another method outside main (A simple guessing/learning game scenario). I wrote a smaller test of that exercise here: #include <stdlib.h> #include <stdio.h> #include <time.h> struct binary { … | |
I having soap request and response xml in seperate file. i need to parse it and get the data from soap xml file. using C program I know it is possible with libxml2. Is it there any other way to parse ? Is there any facility available in gsoap to … | |
So, as an exercise I wanted to make a simple binary tree as practice before moving on to other, harder things. I tried to implement a binary tree in a simple guessing game scenario. I can't test it due to issues I'm having with taking in input. But I can't … | |
actually, I am trying to do digital watermarking. can you please giv me some hints of algos which i can use to do watermaking on numbers ? like i have array of numbers, then i want to water mark them with some kind of algo and also want to save … | |
if f(x,y) be a function (x^3 * y^-4) + (x^-2 *y^3) with 2<x<10 and 1.1<y<3.5.f(0,0) = f(9,1.2). how do you develop a c program of loop(x decremented by 1 unit) with in which another loop (y incremented by 0.8(K) initially and then as the y reaches a value where incrementation … | |
Hi, so I'm having a strange problem right now when I'm initializing an array that is a double pointer. The line that is causing me problems is lines->list = malloc(num_elements * sizeof(char *)) Lines is a struct, and list is a double pointer to a character. So char **line All … | |
#include <stdio.h> typedef struct { int stat1, stat2, stat3; } X_type; void createPlayer(char *X) { X_type X; } int main() { createPlayer("Foo"); createPlayer("Bar"); return 0; } I would like to create a structure ojject based on a string passed to a function. So the above code would create 2 X_type … | |
I have to perform cryptanalysis of vigenere cipher using C...i was able to get a key for a given cipher text., and now i want to get the plain text as well. Is it possible to get the encoded message from the user and generate the cipher text using a … | |
Can any one tell me about fibonacci heap? I have read that it can be implemented using prims algorithm. but i actual i do not know what is fibonacci heap So can any one tell me what is fibonacci heap? how to implement fibonacci heap? what are the applications of … | |
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "queue.h" #include "stack.h" #define NAME_SIZE 20 #define RECORDS_SIZE 100 typedef struct { char studName[20]; int timeEnter; int timeUpdate; }STUDENT; typedef struct { char tutorName[NAME_SIZE]; int tutorTime; STUDENT *ptr; }TUTOR; QUEUE *queue1; STACK *stack1; void getData(STUDENT *studArr[], TUTOR tutorArr[1]); int main(void) { STUDENT *studArr[RECORDS_SIZE]; … | |
I need to output in four columns. 1) The first will contain n. 2) The second will contain pi(n) 3) The third will contain n/ln(n) 4) The fourth will contain the ration of pi(n) to n/ln(n). #include <stdio.h> #include <string.h> #include <stdint.h> #define MAXN 100000000 /* maximum value of N … | |
why I am trying to dynamically allocate memory for this pointer to array of structure I have STUDENT *studArr[] where STUDENT is the name of the structure I tried to allocate like this #include <stdio.h> #include <stdlib.h> #include <string.h> #include "queue.h" #include "stack.h" #define NAME_SIZE 20 #define RECORDS_SIZE 100 typedef … | |
How do I define a typedef struct in function f1() and pass a pointer to function f2() without a global definition of the struct. For instance: Also I would like this to be in C but not in C++. I have no toolbar, so I cannot put the code I … | |
I have putten together this code for searching a text file for a users string (User's ID), how every i am aving some error that i dont knw how to fix and was hoping someone could help me. Thanks in advance. #include<stdio.h> #include<string.h> #inlcude<stdlib.h> int main() { FILE *fpcust; int … | |
I'm trying to strip only path from a c string char *path = "~/folder/sometext.txt" so I would get only "~/folder/" Anyone got a hint on how to achieve this? I was thinking of something similar to std::string find_last_of so I could just indicate the last "/" or "\" in the … | |
[CODE]#include <stdlib.h> #include <stdio.h> #include<conio.h> void main() { int ch; clrscr(); printf("\n\n~~~~~~~~~~~~~~~~~SHUTDOWN MENU~~~~~~~~~~~~~~~~~~~\n"); printf("1.Shutdown\n2.Restart\n3.Logoff\n4.Hibernate\n5.exit"); printf("\nEnter choice : "); scanf("%d",&ch); switch(ch) { case 1:system("shutdown -s"); break; case 2:system("shutdown -r"); break; case 3:system("shutdown -l"); break; case 4:system("shutdown -h"); break; case 5:exit(1); break; default:printf("Invalid choice"); } getch(); }[/CODE] | |
this is my code: switch(a){ case 1: case 2: case 3: case 4: printf("4\n"); break; default: break; } i need the nodes to make control flow graph for testing purposes. | |
I have the following code.According to this the values of pointers p[0] and p[1] remains unchanged since the swap is made to local variables in swap function.Now my doubt is how can I swap the pointers p[0] and p[1] inside the function swap?? #include<stdio.h> int main() { char *p[2]={"hello","good morning"}; … | |
Dear all, In the function below, how should the array of arrays data structure be defined and used? void foo(int option) { int i =0; char Colstr[3][15] = {"Red","Blue","Green"}; char Volstr[7][15] = {"1","2","3","3.5","4","4.5","5"}; char Sndstr[4][15] = {"lo","med","hi","vhi"}; int numSTrings[2] = {3,7,4}; char *arrayOfarrays[] = {Colstr,Volstr,Sndstr}; // How should this be … | |
| |
Please help me. I have a problem with this program. what will be the code of the following output? 3 6 9 12 15 18 21 24 27 30 | |
Hello I am at a lost of how to search for data in a file which was populated through structure. Supposed I have 15 chemicals and each of them contains additional information (e.g. Chemical Name, Chemical Formula, Chemical type, State of the chemical, Antidote name etc). If I want to … | |
I have to submit a C project tomorrow on KD tree and i found this code.I understand some parts of it but rest is out of my head.I know how kd tree is created.Please help #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <time.h> #define MAX_DIM 3 struct kd_node_t{ … | |
Hello guys, i'm new here. I would like to convert my .txt file which have the following content into an array of int which every elemnt in the array should only have 4 character inside. example: two[1]= 0x03; two[2]= 0x00; two[3]= 0x03; two[4]= 0xf5; This is the content of my … | |
I have to accept user input, a string, into a doubly linked list and print the output reversed and forward. My professor gave us the following program and told us to modify it. However, I cannot figure it out. /* Program to reverse a doubly linked list */ #include <stdio.h> … | |
void boss_animation() { for (int i = 0; i < 4; i++){ if( ! boss[i].drawable) continue; //Puts image of character on screen based on inputs from struct readimagefile(boss[i].frames[boss[i].currentFrame], boss[i].xCoord, boss[i].yCoord, boss[i].xCoord + boss[i].charWidth, boss[i].yCoord + boss[i].charHeight ); boss[i].currentFrame++; //increments the "frame" by one, thus only animating one image at a … | |
does bool work in c(by this i mean a data type that can take only two states 0 or 1 in order to save memory)? if yes then is it included in stdio or any other file is required to be included? same doubt for c++ also mention the syntax … |
The End.