No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
12 Posted Topics
Hi, I am trying to make a word counter, for that I have to input a string line untill '@@@' character is entered. My problem is that when I enter "Hello hello" as my input it reads the last hello twice.. or this is what I think it does.. Right … | |
Hi, I have to create a structure for student record and save their data, but I am having trouble in storing that data. This is what I have: [CODE] struct student { char id[7]; char firstname[20], lastname[20]; char phoneno[15]; char address[100]; dobtype dateofbirth; }; int main(int argc, char *argv[]) { … | |
Re: Hi, As far as I know, we cant use a variable to declare the size of array. In your code, you have: [CODE] char inc[n]; //where your n is integer type. [/CODE] If you really want to do it that way, then declare a const of int type. [CODE] const … | |
Hi, I am having trouble comparing characters from two strings. This is what I have [CODE] void encrypt(string plaintext, string vigenere_table[length][length], string keyword, string& ciphertext) { int row, col; for(int i=0; i<20; i++) { for(int x=0; x<length; x++) { if(vigenere_table[x][1] == plaintext[i]) //wont let me use == row = x; … | |
I am trying to make a circular linked list. I will appreciate if anyone can tell me how to make it better. [CODE] int n = num_people; Node *head = new Node; head->next = new Node; Node *temp = head->next; for(int x = 2; x < n; x++) { temp->next … | |
Hi, I am confused in making circular linked list. This is what I have. CircularLinkedList.h [CODE]#ifndef CircularLinkedList_H #define CircularLinkedList_H class CircularLinkedList { public: void remove(); void set_number_people(int); void print(); }; #endif[/CODE] CircularLinkedList.cpp [CODE]#include "CircularLinkedList.h" #include "Node.h" #include <stdio.h> void CircularLinkedList::set_number_people(int num_people) //This is where I am confused { Node *head … | |
Re: What is the output of this program? I mean does it display the number of words in the string (which is the last part of the program)? | |
Hi, I was working on Josephus problem, where I have to make a circular linked list and having errors in it. Will really appreciate if anyone can help me. The following method is in Node Class: void link(int num_people, Node* temp) { int n = num_people; [B]head->next = new Node;[/B] … | |
Re: In line 38 of your program, why have to used tolower() if you want it to be in uppercase? | |
Hi! I am having trouble many a queue of Nodes. I have a class of Queue (user defined - as I am not allowed to STL), with methonds as enqueue(), dequeue() and getFront(). And also I have a class of Node with data and frequency in it. Now I have … | |
I have to make an array of Nodes. I have #include "Node.h" as my header file and then in main I am writing the following code Node[] Node_array = new Node[]; but then I am getting errors referring to the above line: error C2143: syntax error : missing ';' before … | |
Can somebody help me in reading text from a file without using Java Class Library??? |
The End.