49,757 Topics

Member Avatar for
Member Avatar for ايمان_2

It is possible to use any number of characters '/' as a delimiter in path instead of one traditional '/'. For example, strings //usr///local//nginx/sbin// and /usr/local/nginx///sbi n are equivalent. The character '/' (or some sequence of such characters) at the end of the path is required only in case of …

Member Avatar for Ancient Dragon
0
535
Member Avatar for nhrnjic6

Ok, I hope this is the right place for his kind of disccusion. I assume that this kind of question is rather apsurd but I may get killed for this. I have had expirience with both java and c++ but non in field of system programming. I am finishing my …

Member Avatar for deceptikon
0
448
Member Avatar for nitish.mohiputlall

here is the question: The series of numbers: 1, 1, 2, 3, 5, 8, 13, 21, ….is known as Fibonacci series. Each number is the sum of the two preceding numbers. Write a C++ program that writes the first 5 Fibonacci numbers to a file fibnos.txt (in your local drive). …

Member Avatar for vmanes
0
205
Member Avatar for smitsky

I'm trying to understand this function. I try to compile an run it, but it gives an error message at line 12. Thanks. #include <iostream> #include <string> #include <cmath> using namespace std; int stringConvertInt(string raw) { int sum=0, power=0; power=raw.length()-1; for(int i=0; i<raw.length(); i++) { sum=sum+(pow(10,power)*(raw[i]-48)); power--; } return sum; …

Member Avatar for smitsky
0
230
Member Avatar for moaz.amin.37

i have a problem that how to concatenate more than two string in operator overloading i write a code but it is not run #include<iostream> #include<conio.h> using namespace std; class count { private: char str[50]; public: count() { str[0]='r'; } void input() { cout<<"Enter string = "; cin.getline(str,50); } count …

Member Avatar for moaz.amin.37
0
510
Member Avatar for nitish.mohiputlall

My program displays the details of 2 students. name id address module code and module marks. my program works well but the problem is when i enter the details of the 2nd student i am not able to enter the name as if it skip this first part and go …

Member Avatar for StuXYZ
0
149
Member Avatar for waleedahmad

Here's a little program i wrote, i'm trying to pass my structure book to function input. The code works fine on Code::Blocks but VS12 is giving an error on compliation " error C4700: uninitialized local variable 's' used ". What i'm doing wrong? #include <string.h> #include <iostream> using namespace std; …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for MaidaKhan

The insert function int the arrayList is not working...d[count] = v is giving garbage.I am unable to find the problem.Can anybody please help. class ArrayList { private: int count; int *d; public: ArrayList(int size=2) { d=new int[size]; count = 0; } void insert (int r) { d[count] = r; count++; …

Member Avatar for iamthwee
0
119
Member Avatar for MaidaKhan

This fuction of insert in descending order is not working.Can't find the problem.Can anyone help? class LinkedList { private: class ListNode { public: int data; ListNode *next; ListNode(int d) { data=d; next = NULL; } }; ListNode *head; public: LinkedList() { head=NULL; } void Inorder(int d) { ListNode *tmp = …

1
89
Member Avatar for Jamie_3

#include <iostream> #include <conio.h> using namespace std; int main(){ char command[1024]; char newchar; cout << "Command Line Interface Test with Intellisense" << endl; cout << endl; newchar = _getch(); command = command + newchar; } My Code. It doesn't work. `command = command + newchar` has a problem. Please help.

Member Avatar for vmanes
0
766
Member Avatar for mohanned_1
Member Avatar for Shehroze
Member Avatar for Shehroze
0
250
Member Avatar for mc3330418

I have a text file below that I read from. 0123456789012345678 IN NUMBER LOOP LD NUMBER BZ LPEND LD TOTAL ADD ONE STO TOTAL LD ZERO SUB NUMBER BGTR ENDIF BZ ENDIF LD POSITS ADD ONE STO POSITS ENDIF IN NUMBER B LOOP LPEND LD POSITS MPY HNDRD DIV TOTAL …

Member Avatar for mc3330418
0
297
Member Avatar for ravi_14

i am not able to connect to the sql server on my system. SqlConnection^ connection=gcnew SqlConnection(); connection->ConnectionString ="Data Source=blueboy\sqlexpress;Initial Catalog=DCV_DB;Integrated Security=SSPI;Pooling=False"; i got the string from database properties.(i have attached the same in this post) sql service is running. tcp ports are enables too.

0
113
Member Avatar for thief420

Please help me with this error. Thank you in advance [Linker error] undefined reference to `Simple_window::Simple_window(Point, int, int, String const&)'

Member Avatar for Ancient Dragon
0
41
Member Avatar for agrbinoo.albaker

Write a complete C++ program that reads the attached file (values.txt) to find and print the following: a. The average value of the numbers in the file. b. The maximum and minimum value c. The count of negative and positive values (ignore zero) #include <iostream> #include<fstream> using namespace std; int …

Member Avatar for Moschops
0
171
Member Avatar for Reem_1

I tried all possible test cases and It outputed the correct answer , I wonder why UVA doesn't accept my answer <#include<iostream> #include <stdio.h> using namespace std; int main() { int i, j; unsigned long long int tempI, tempJ; int maxCaseLen = 1; int count = 1; while (scanf("%d %d", …

Member Avatar for Reem_1
0
630
Member Avatar for daniel1977

I am getting an error in the header file: class linkedStackType: public stackADT<Type> Can you see anything wrong with what I have, and why the compiler is complaining about "stackADT"? I would love it if you could give me some insight into this matter. Right now I'm only concerned about …

Member Avatar for mike_2000_17
0
211
Member Avatar for phony

// This program uses the a queue template to create a queue of strings. #include <iomanip> #include <iostream> #include <cstdlib> using namespace std; // // TO CREATE A "template" class named "T" template <class T> // // TO CREATE A CLASS NAMED "Dynque" class Dynque { private: struct QueueNode { …

Member Avatar for phony
0
297
Member Avatar for dudicus14

{file has 1000 lines that look like these 114680858 19670607 Matilda Vincent MI 114930037 19471024 Desdemona Hanover ID 115550206 19790110 Xanadu Perlman ND 116520629 19630921 Alexander Hall SD 117050976 19301016 David Lamprey GA 119610646 19650202 Thomas Porlock IL 120330928 19621126 Cary Cartman NC struct employees { int ss_number;//social security int …

Member Avatar for vmanes
0
144
Member Avatar for Labdabeta

Hello, I have a bug in my program somewhere and I cannot understand why. The program merely prints data from a binary file. Here is the code: #include <iostream> #include <fstream> #include <vector> #include <cstdint> using namespace std; int main(int argc, char *argv[]) { if (argc!=2) { cout<<"Invalid argument count, …

Member Avatar for Labdabeta
0
409
Member Avatar for inspire_all

i am trying to overload +operator to concat 2 strings i tried to write a code but it is giving 2 errors and i am also not sure whether logic is correct..MY CODE is [CODE]#include<iostream.h> #include<conio.h> #include<string.h> class string { char *str; public: string() { cout<<"enter string"; cin>>str; } void …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for maisara

I hve sme doubt in pseudo code I hve created da flow chart and c++ code but I need to create pseudo code I dnt no hw to create it Becz da flow chart hve 2 inputs such as cot=0, ans='y' And 5 option such as add inquiry , view …

Member Avatar for vmanes
0
279
Member Avatar for Auroch

Hello, I have the following problem: Entering coordinates of points on a plain with keyboard (as rows x,y). Analysing this coordinates. Replacing coordinates in vector (point - structure data type). Then calculating distance from the first point to all another points. I've written the code of this problem using arrays …

Member Avatar for Auroch
0
2K
Member Avatar for catastrophe2

hi so why isnt queue printing anything where it should? #include<iostream> #include<string> using namespace std; template<class ItemType> struct NodeType { ItemType info; NodeType* next; }; template<class ItemType> class Queue { private: int size; NodeType<ItemType>* front; // It points to the front of a singly-linked list NodeType<ItemType>* rear; // It points …

Member Avatar for catastrophe2
0
205
Member Avatar for Kristian_2

I have solved it... Shame... -------------------------------- I have problem with this code: cin >> str; smatch m; regex e("([[:w:]]+)@([[:w:]]+)\.com"); //<- Here was the error (it was regex e("([[:w:]+)@([[:w:]]+)\.com");) silly me :(( bool found = regex_search(str, m, e); cout << "m.size() " << m.size() << endl; for (int n = 0; …

0
148
Member Avatar for Gurjot_1

Hi, So I am working on a drink machine simulation. I have a text file that holds the prices, names and inventory. My problem is It won't let me set my prices at 1.00 or higher. Ex: I set the price to 1.50 in the text file then when the …

Member Avatar for nullptr
0
253
Member Avatar for sunny@123

Using the sample BUBBLESORT program with CHARACTERS given in class do the following: Enter 10 words (does not have to be a phrase or sentence..you may use some digits, caps, and special characters like punctuation. Have each of these words including punctuation entered into a character array. Print out the …

Member Avatar for Ancient Dragon
0
283
Member Avatar for Jake_4

Hello, I am trying to create a tone, then another tone using this code. It currently only plays one of them. Is there something missing or am i going about this wrong? for(int n = 0; n < num_samples; n++) //where n is the step |start of for loop { …

Member Avatar for pritaeas
0
185
Member Avatar for Jake_4

Hello everyone, i am going to create a small tune though i have no idea how to go about it. I currently have a sine wave that plays for one second using a loop similar to this // loop to generate audio samples for(int n = 0; n < num_samples; …

Member Avatar for phorce
0
314

The End.