Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
~3K People Reached
Favorite Forums
Favorite Tags
Member Avatar for H_beginner

I am using the gcc compiler and I am new to using flags. Can any one tell me a source for it. e.g. I wanted to use *-funroll-loops* but I dont know the proper syntax. Can any one help.

Member Avatar for L7Sqr
0
245
Member Avatar for H_beginner

Can anyone please tell me how can I do loop unroll void do_block (int lda, int M, int N, int K, double* A, double* B, double* C) { /* For each row i of A */ for (int i = 0; i < M; ++i) /* For each column j …

Member Avatar for H_beginner
0
290
Member Avatar for H_beginner

Can any one tell me what I am doing wrong. I am sorting a single linked list. void ll::sort() { for(int i=0;i<size-1;i++) {node *cptr = fptr; for(int j= 0;j<size-1;j++) { if((cptr->no) > (cptr->nxt->no)) { if(cptr == fptr) { node *c2ptr = cptr->nxt; cptr->nxt=c2ptr->nxt; c2ptr->nxt=cptr; fptr = c2ptr; } else { …

Member Avatar for richieking
0
307
Member Avatar for H_beginner

I am trying to plot a graph in matlab using c++. But the matlab is only giving me an empty graph. void portfolio::viewGraph() { double value[20]; //store portfolio value double time[20]; //store time int i=0,j=1; double cash,p; ifstream in_file("transactionhistory.txt", ios::in); string c; while(in_file>>cash>>p>>c>>c>>c>>c>>c) { value[i]=(p+cash); cout<<p<<endl; time[i]=j; cout<<time[i]<<endl; i++; j++; …

0
176
Member Avatar for H_beginner

I m reading data from a text file and then printing it. I am not sure what I am doing wrong but the program prints the last line that it reads twice. void bank_account::viewHistory() { ifstream in_file("bank_transaction_history.txt" , ios::in); if(!in_file) { cout<<"File error \n"; } cout<<"Event"<<setw(15)<<"Amount"<<setw(15)<<"Date"<<setw(20)<<"Current Balance"<<endl; string eve,dat; double …

Member Avatar for deceptikon
0
286
Member Avatar for H_beginner

#ifndef POINT_H #define POINT_H class Point { public: Point(); Point(int, int); int getx(); int gety(); void setx(int); void sety(int); private: int x,y; }; #endif //POINT.CPP #ifndef POINT_H #define POINT_H class Point { public: Point(); Point(int, int); int getx(); int gety(); void setx(int); void sety(int); private: int x,y; }; #endif #ifndef …

Member Avatar for H_beginner
0
415
Member Avatar for H_beginner

I am new to classes and was trying to create an elmentary program to understand classes and objects. I ve created three files 1) header file for class declaration 2) class definition .cpp file 3) class implementation main .cpp file I cannot understand the error I am getting. Please help. …

Member Avatar for tinstaafl
0
224
Member Avatar for H_beginner

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 …

Member Avatar for Banfa
0
441
Member Avatar for H_beginner

I am trying to create a program which adds substracts two matrices. Using switch statements. I am not sure that I am making the correct function calls. I ve been struck on this for two days looking for some guidance. Please see below my code. I am trying to create …

Member Avatar for rubberman
0
152
Member Avatar for H_beginner

I wanted to know if I can make the matrix size entered by the user dynamic. Currently I have fixed it as a 2*2 matrix. If I try making it a dynamic array it says the integer should be constant. #include<iostream> #include<iomanip> using namespace std; int input (); void output(int …

0
82