if I haveto multiply two matrices one 3x2 and the other 2x3, what threads I have to create . I know that there are 10 of them.
#include <stdio.h>
#include <iostream.h>
/* Allocate memory for a matrix of given order */
void create_matrix( int ***mat, int m, int n)
{
int **la = NULL;
int i;
//la = (int**)malloc(m * sizeof(int*));
for ( i=0; i <m; i++ )...
User Profile
Collapse
-
threads in Win32 using C++
-
error:namespace
I have this main.cpp program and when it runs gives th error: namespace name expected. Any help?
The error is namespace name expected
# include <iostream>
# include "ListA.h"
# include <conio>
using namespace std;
int main()
{
List lst;
for (int i=0; i<30; i++)
{
int num;
cout << "Enter a number:... -
The error is namespace name expected
# include <iostream.h>
# include "ListA.h"
# include <conio.h>
using namespace std;
void main()
{
List lst;
for (int i=0; i<30; i++)
{
int num;
cout << "Enter a number: ";
cin >> num;
lst.add(num);
}
... -
help with namespace
I have the code and used namespace, but when I run the program it gives me the error. Any help how to fix it. -
help to add sumation part in my program that i have
I have gone so far entering the int, creating the list and displaying. How do I do thesummation part.
//# include <iostream.h>
//#include <conio.h>
//# include <iomanip.h>
# include "ListA.h"
List::List():si ze(0) {
}
bool List::isEmpty() const
{
return bool (size==0);
}
int List::getLength () const
{
return size;... -
help with list.h and list.cpp
I wrote this listA.h and ListA.cpp. I am not sure if it is right or not. Anybody can offer some help. The user has to enter 30 integers and he program has to store and display the list as well as the sum of integers. Help.
# ifndef ListA_H
#define ListA_H
const int MAX_LIST=30;
typedef int ListItemType;
class List
{
public:
...Leave a comment:
-
inserting integers in a list and displaying their sum
The program asks the user to enter the inegers (up to 30) and display their sum, by using List.h and then List.cpp. Help please. -
multithread in multiplication of two matrix
What flag can you use for multithreading in multiplication of two matrixes -
i have the program, what if fabs(x1-x2)much smallerthan fabs(y1-y2)
#include <iostream.h>
#include <conio.h>
main()
{
float x1,x2,y1,y2;
float A, B,C;
float z=1;
while (z==1)
{
cout<<"\nPlease enter the cordinates of the first point(x1, y1)";
cin>>x1>>y1;
cout<<"\nPlease enter the cordinates...Leave a comment:
-
print directly from the line printer
how do you print from the line printer the output of the program and not from the clipboard. -
Anjola
what is the equation of the straight line lying between two points with coordinates (x1,y1) and (x2,y2). I got the point of finding the slope, and when (x2-x1!)=0. How you avoid the fact of fabs(y2-y1) much smaller than fabs(x2-x1).
No activity results to display
Show More
Leave a comment: