49,761 Topics

Member Avatar for
Member Avatar for blessedboy123

Hey i have 1000 replicate files with a file name looks like below a.out1 a.out2 a.out3 ..... a.out1000 each file contains 12 rows and 12 columns including the header. a.out1 looks like this n col1 col2 col3 col4 ...........col12 1 0.3 0.1 0.1 0.11............0.5 2 .................................... 3 4 5 6 …

Member Avatar for mitrmkar
0
100
Member Avatar for Tiny_trixer

I'm just playing around with C++ as a preperation for coming assignments and well, exams. And I'm a little stuck with the switch statements. I've done this simple switch just to test the functions: [CODE] #include <iostream> using namespace std; int main(void) { char input; cout << "\nChoose function.\n1. Test …

Member Avatar for Tiny_trixer
0
116
Member Avatar for OPTIMUS999

I have a payroll program that I been working on for a while and I gotten my code written. Yet, when I compile the program it keep giving me erros and I can't figure out why. I wonder is there anyone out there can tell me why I keep getting …

0
74
Member Avatar for Photomotoz

Hi, I implemented a priority queue using STL. And that part is working great. Now, looking back on my problem it seems as though I need to know if a certain node exists in the queue. So I am looking some advice on what the best course of action would …

Member Avatar for csurfer
0
144
Member Avatar for qinise4

Hi Everyone I am currently writing a program in C++ which uses a very big matrix, I have been told to try and store the matrix in disc and try to retrieve only the chunks of the matrix I will be needing and keep swapping them around. The problem is …

Member Avatar for qinise4
0
2K
Member Avatar for macla

Hi, I want to install the softwares remotely.Backups of these software are with my Local system.Now i want to install it on another computer on lan or wan using c or c++ .... Any ideas ?

Member Avatar for macla
0
102
Member Avatar for c++ failure

The Green Tree Service Company offers the following services to its customers: * tree planting - $35 for a small tree, $100 for a medium tree, $250 for a large tree * tree removal - $150 per tree * tree trimming - $50 per hour * stump removal - $75 …

Member Avatar for c++ failure
0
151
Member Avatar for gotjeff5

So here is my problem. I have been working on a program that impliments a tic tac toe game, but for some reason my array gets messed up after the switch statement in playerX function. If you could take a look that would be great. Heres my program: [CODE]#include<iostream> using …

Member Avatar for Intrade
0
136
Member Avatar for lou38

I need help with this assignment, I dont know where to start. Here is what the assignment is: Write a program that finds both the largest and smallest of several integers. Assume that the first integer read specifies the number of values remaining to be entered and that the first …

Member Avatar for WaltP
0
458
Member Avatar for Annettest

Hello all, I have what is probably a silly question... I want to fill a 2-dimensional array called instantAct with values from another 2-d array called mS. The two arrays have different dimensions, but they have the same number of values. I want my loop to take values from certain …

Member Avatar for chief427
0
764
Member Avatar for baconswife

I have typed this many ways into dev-c++ trying to figure out how to figure out the output but it always comes back with errors no matter what headers I have used and other things. Can anyone give me some ideas? I don't want the answer, just ideas on how …

Member Avatar for mike_2000_17
0
1K
Member Avatar for zathura

i dont know what happen..when i complie..there's error... so..what suppose i do??please.. [CODE]#include<dfp.h> CMatrix CDfp::operator()(double(*p)(CMatrix&),CMatrix& X0,double e) { pfun=p,n=X0.getrow(); X.set(n,1),S.set(n,1); X=X0, error=e; CMatrix B(n,n),B0(n,n); CMatrix TiDu(n,1),TiDu0(n,1); CMatrix DG(n,1),DGT(1,n),DX(n,1),DXT(1,n); CMatrix E(n,n); CDiffer differ; double a; double dfm; int flag(0); int k(1),c(1); for(int i=1;i<=n;i++) B(i,i)=1; B0=B; TiDu=differ(pfun,X,error/10); dfm=TiDu.getmod(); ofstream out(".//result.txt",ios::ate); for(k;k<=n;k++) { …

Member Avatar for sundip
0
128
Member Avatar for Bigbrain99

Hi guys, I'm still new to C++ and get confused by the codes below.. [CODE]class FLATMATE { string name; public: FLATMATE() { name = "";} FLATMATE(string n){name = n;} string getName(){return name;} void setResident(string n){name = n;} };[/CODE] [CODE]class DUTY { FLATMATE resident; //name of the flatmate int RequestOffer; //amount …

Member Avatar for Bigbrain99
0
116
Member Avatar for heidik

Could you please have a look at the code and tell me the reason why it is giving me an error? [code] int timeDiff(std::string startDateTime, std::string endDateTime) { std::string strtYYYY, strtMM, strtDD, endYYYY, endMM, endDD; int strtY, strtM, strtD, endY, endM, endD; strtYYYY = startDateTime.substr (0, 4); cout << "String …

Member Avatar for ixmike88
0
142
Member Avatar for sid78669

I recently had an assignment for an advanced coding class where I was to create a Binary tree from inorder and preorder traversals. I first started out by creating my ADT for binary trees and working with that to create a new tree. The way I worked it was that …

Member Avatar for arkoenig
0
154
Member Avatar for snivek

I have a function that needs to read a file line by line. It will check that line for a number(a process ID for my process scheduling function). The line is delimited by |. So I read the line in, get the first ID number, and then I want to …

Member Avatar for daviddoria
0
165
Member Avatar for ace8957

Hey Everyone! So I'm a super beginner trying to teach myself the ins and outs of stacks (ever so slowly). Specifically, I'm trying to work out a programming challenge in which the objective is to write a function to tell if a string in the format of word1$word2 satisfies the …

Member Avatar for ace8957
0
169
Member Avatar for Mona..

hello.. What do we mean by binary search and how we can do it using C++ thanks..

Member Avatar for Mona..
0
116
Member Avatar for ekailan

I am working on creating windows.h to creat tow threads, each thread takes tow files as input, the function that each thread excute is tested and work 100%,the problem is that one thread could work at atime ? I mean one function is excuted this is the threading code i …

0
72
Member Avatar for WhoCares357

I'm trying to read some input from a file and print it. I have three files: Main.cpp Sudoku.cpp Sudoku.h. For some reason the program will not print anything unless it's in the main function. If I print anything in one of the functions of Sudoku.cpp file and the use that …

Member Avatar for WhoCares357
0
589
Member Avatar for Pikachumanson

First off, this is homework and I do my classes online and the teacher doesn't respond to my e-mails in the fastest fashion. I've been getting linker errors all day and I'd like at least an explanation of why they happen. here is my problem. Main.obj : error LNK2019: unresolved …

Member Avatar for vijayaustin
0
147
Member Avatar for Mona..

hello.. can u tell me how i can determine if a certain number is a perfect number or not?! please help me.. thanks.

Member Avatar for mike_2000_17
0
81
Member Avatar for vbx_wx

How can I define an operatpr [] for this class ? [code] #include <iostream> using namespace std; class Vec4 { float f1,f2,f3,f4; public: Vec4(float ff1, float ff2, float ff3, float ff4): f1(ff1), f2(ff2), f3(ff3), f4(ff4) {} float operator [] (int index) { } Vec4 operator + (const Vec4& v) { …

Member Avatar for mrnutty
0
90
Member Avatar for Greywolf333

Hey all, I've been using Visual Studio for a long time. Lately though, after I build an executable successfully, it won't let me build it again for a solid 60 seconds or so, claiming that, for example, test.exe is still in use (when it's clearly not, because if I go …

Member Avatar for Greywolf333
0
92
Member Avatar for heidik

Hello Everyone. Could anyone please help me quickly find duplicates in a vector of over 60000 records. It takes a loooootttttt of time ;'(. Here's the code. [code] #include <string> #include <vector> #include <iostream> #include <algorithm> #include <sstream> struct MyPred { std::string x; std::string y; // add default values MyPred(const …

Member Avatar for heidik
0
110
Member Avatar for gpjacks

I am new to programming so our assignment was to create a number guessing game, where the user picks a number from 1 to 100. The initial guess in 50 and then the program asks the user if it is higher or lower than my guess. Once the answer is …

Member Avatar for gpjacks
0
163
Member Avatar for Firsum

Hi guys!! I made a simple RPG where the player can move along the x and y coordinates, choose a class and meet opponents. I accept any suggestions on how to improve game. [ATTACH]17738[/ATTACH]

0
130
Member Avatar for muze

hello guys...how can i use iostream.h in VS2008?? im using following code but it is no t working... [CODE] #include <windows.h> #include <iostream.h> HANDLE hEvent; DWORD WINAPI SampleThread(LPVOID iValue) { int iFinish = 120; for(int i=100;i<=iFinish;i++) cout<<i<<endl; SetEvent(hEvent); return 0; } void main() { HANDLE hThread; DWORD dwGenericThread; hThread = …

Member Avatar for thelamb
0
175
Member Avatar for Intrade

I'm fairly new to Boost. I would like to use the Regex library. I wanted to follow this guide but it seems that it supports other versions of VC++. [url]http://www.boost.org/doc/libs/1_44_0/libs/regex/doc/html/boost_regex/install.html[/url] EDIT: I tried finding a link to VC++ 6.0 and I can't find it >_<, apparently Microsoft is no longer …

Member Avatar for thelamb
0
110
Member Avatar for losh177

Hi, I need some help figuring out what's wrong with my code. I'm getting quite a few of syntax errors for missing ';' which I have and missing type identifier. This errors are happening on my intarray.h file for string declaration (line 34). I get more errors that still need …

Member Avatar for losh177
0
182

The End.