49,761 Topics
| |
I have to find the permutation of vector of integers. I need to implement and interleave function vector<vector<int> > interleave(int x , const vector<int> & v); Using interleave we can implement a permute function. vector<vector<int> > permute(size_t n); that returns a vector containing of the first n positive nos. I … | |
This is just an exercise. And i need to complete this. This is the question : Write a program in C++ that calculates the amount to be paid to an employee based on the hours worked and rate per hour. A user will enter hours worked and rate per hour … | |
Hi, I m trying to convert c code to c++. I m stuck at some part! Please help. What will be c++ equivalent of this snippet? void Scanned(FILE * ifp,int i) void Read(FILE * ofp) int Checker(char s[],char u[]) void Stored(FILE *) void Printed(FILE *ifp,FILE *ofp) These are file pointers … | |
Hi there, Is there a way to change strings array size on run time. I mean array size initial value is 1, when i run the program, how much user add values array size increases. I have tried following but its not working, please i need a solution in array … | |
Sir, I wanted to know the implementation code for krushkal algorithm in C++. Anyone can help me to give the code. ThnQ | |
Hello, I'm working on a homework problem for class. I have a text tab delimited file and each row has a orginal base, target base, and a number that is represented in the orginal base. The program should read this file and be able to convert the number from the … | |
This is more of a tale of "I think I broke it". Basically as an assignment for CS I have to write an assembler for a subset of the MIPS assembly language. Currently it is not working, getting a sigseg, so I decided to debug the code and step through … | |
Well, I do not find solution, if any help me would be great, here the code and where the error log is visual c + + 2012 // ver1.1.cpp: define el punto de entrada de la aplicaciĆ³n de consola. // #include "stdafx.h" /* examples/standalone_example_docs1.cpp */ /* Standard C++ includes */ … | |
I have a set of data imputed into a set of arrays as the following: for (int i=0;getline(file,(cities[i]),',');i++) { getline(file, countries[i], ','); getline(file, latitudes[i], ',') ; getline(file, longitudes[i]); } How do I sort the array line of latitudes and longitudes without changing countries and city it is associated with? | |
How to create a rubber banding line using the left-mouse button in win 32? | |
I need to implement an interpolation search on a linked list, I have some code but I'm getting errors whenever I search anything that isn't the first element. Even if the element I'm searching for is in the list, if it isn't the first one it returns a -1. int … | |
[create a data file] [Appened Record] [Edit a Record] [Display a Single Record] [Browse all record] [Exit] program discription mini grading system w\ccompute your final grade. create a data file named studrec.txt accepts the ff. feilds info: ID no Last name First name mmiddle name Quizes and grades Q1 Q2 … | |
i want build 1 const with std::endl but by some reason isn't accepted:( #define NewLine std::endl i understand the '#define' isn't adviced to be used, but in these case i belive that i can't use the 'const':( what isn't right with that line? error message: "C:\Users\Joaquim\Documents\CodeBlocks\My Class\console.h|170|note: void Console::write(A, B … | |
Friends please help me to made clear ideas about these topics which is better for todays trend c++ or SAP... | |
i have 1 class: class class1 { void Created(); calss1() { Created(); } } class1; void class1::Created() { cout << "hello"; } imagine that i don't write: void class1::Created() { cout << "hello"; } i get an error. i try these too: class class1 { void Created() { //do nothing … | |
Please, I know this is a simple question. I'm copying this code out of my text book, almost ver-mother#&$(ing-batm And it mother#&$(ing refueses, REFUSES to open the mother#&$(ing file and write to the mother#&$(ing array. WTF - Sorry for the language, but this is so stupid and silly and I … | |
Hey guys, slightly less noob programmer here for a some more help, This week in class we were assigned to create a phonebook with a couple functions to manipulate it, but it seems I am having a couple problems. It seems to me that I have most of the program … | |
So I'm using GCC. I downloaded MinGW base tools and g++ compiler from the installer, and wrote a basic "hello world" program. The source code is as followed: #include <iostream> int main() { std::cout << "Solidum petit in profundis!\n"; return 0; } I saved this as Motto.cpp. I went into … | |
Hello Programmers! How can I throw an exception if an unsigned int variable overcomes a limit (that is set by myself). I want the exception to terminate all processes. Thanks! | |
string str; int k=0, count = 0,namelength, size,j=0; char name[80]; char extract[80]; char reversing[80]; cout << "Enter word or enter 'Q' to quit." << endl; cout << ">>"; cin.get(name,80); size =strlen(name); int q=0; for(int i=0;i<=size;i++){ if(isalnum(name[i])){ name[q]=name[i]; q++; }else{ name[i]= '\0'; } cout << name[i]; /*line start here when removing … | |
Okay so I have fstreams that I swap between output and input. Is there anyway I can tell which openmode the fstream is in? | |
The maximum size of my array is 20 but I want the array to display only items that have been entered. I dont want the zeros to be considered in the array in all my operations like sorting and printing etc. Can anyone help. #include<iostream> #include<iomanip> using namespace std; void … | |
I have completed this project for my Computer Science I class. I received full credit because the program is functional with no issues at a glance. However, upon testing the program again (after it was graded), I found that under specific circumstances an infinite loop occurs. I couldn't go on … | |
I have running totals of int minutes and int seconds and I can display them as mmm:sss, but I need to convert them into hh:mm:ss. Any ideas? Thanks in advance for your help. | |
Hello ,,, Please I need Your Help as soon As Possible.. I have an array of integers and i need to convert it to string ... PlZ Help me as soon as Possible ... | |
How can I convert a string into an integer? I tried this: totalMins += atoi(MovieRecord->getMinutes()); Which I think only works for C-strings, and I tried this: totalMins += static_cast<int>(MovieRecord->getMinutes()); which I think only works for converting an int to a double or something similar. | |
Hello peeps! I need some help to decrypt my text file and make it able to read in my program.. What I have programmed so far is to read the encrypted file, create a new file, decrypt it and read the newly created file.. I need to decrypt the encrypted … | |
I have two function in the same class. In the first function I return a value, and I need to use this value in another function. I am returning by value. double Loan::monthlyPayment(double anAmount, double anInterestRate, int term){ double payment = ((anAmount * anInterestRate ) * ((anInterestRate +1)/((anInterestRate +1)*exp(term)-1))); return … | |
I have to write a program in which i have to remove from a string another string if it found. for ex "I am going to school" and second string is "cho" i have to remove cho from first. the output should be "I am going to sol" need help | |
hi, i'm new C++ programer .i wanna find a way to change process name in task manager when it start(example: proc.exe to changed.exe in task manager) tnx for our attention and answers, your new friend Tjsdeveloper. |
The End.