- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
19 Posted Topics
First, to explain what I want to do: I have a folder structure like this: BSDS300\images\test\ -which contains JPEG files, and some other files(only .jpg files are of interest) BSDS300\human\color\ -which contains many folders, in which I have .seg files with the same name as the .jpg file Example: BSDS300\images\test\3096.jpg … | |
currently I have a class function: class MyClass{ static int E(int A,int B, int C){ //function code } }; //and I call it like this : MyClass::E(1,2,3); //what I would like to do is call it in this way: E(1,2,3); //my current macro definition is this #define E(a,b,c) Myclass::E((a),(b),(c)) how … | |
Currently I have something like this: class FileWritter{ ofstream file; public: FileWritter(string filename,A_Class a){//A_Class is class which has defined the >> and the << operators file.open(filename.c_str()); file<<a; } ~FileWritter(){ file.close(); } }; what I want is to have something like this: template <class AbstractClass> class FileWritter{ ofstream file; public: FileWritter(string … | |
Hello everyone, I'm having problems grasping some concepts of parallel programming; to be more precise, given some pieces of code, I have to determine which of them can be parallel and which cannot(this was in a test in a parallel programming class): a) a=2; b=3; //yes-variables are independently initialised b) … | |
Hello everyone, I've encounterred a problem that I cannot seem to overcome. For the program to compile there are a few steps necessary to take: from the website [Click Here](http://osl.iu.edu/research/mpi.net/software/) on the download page, one would need to download and install: 1. MPI.NET SDK 2. Microsoft Compute Cluster Pack SDK(this … | |
i've just started learning the C# language and this is my first program to use threads. I don't understand why the consumer thread doesn't get called( only after the producer has stopped)and when it gets called it doesn't consume anything, also I've noticed that the majority of produced elements are … | |
Re: someone correct me if I'm wrong: both bitwise and logical operators are the representation of the boolean function with the same names(better read on that first as I suspect the fact that you haven't) the diference is that the bitwise ones operate on bits(it doesn't matter if your data type … | |
Heloo,this wil be my first post here, the reason for that is I can't figure this one out by myself public class Client extends Thread{ Socket socket = null; ServerResponse sr = null; private class serverResponse extends Thread{ InputStream in = null; public serverResponse(Socket socket) throws IOException{ if (socket == … | |
[code="C++"] class item { string name; string identifier; public: item( string name,string id):{this->name=name;this->identifier=id;} friend ostream& operator<<(ostream&, const item&); friend istream& operator>>(istream&, item&); }; ostream& operator<<(ostream& out, const item& temp) { out<<item.name<<" "<<item.identifier<<endl; return out; } istream& operator>>(istream& in, Cmessage& temp) { getline(in,item.name);//in case sring has space char getline(in,item.identifier); return in; … | |
I know that you can use assembly combined with C++(either inline or using modules written completely in assembly, linked with the rest of the program), and I was curious how does a program written in different programming languages(eg Mozilla Firefox)work, and how it gets built. | |
Re: [QUOTE=Ancient Dragon;235863] [code] s = "0123456789abcdefghijklmnopqrstuvwxyz"[value % base] + s; [/code][/QUOTE] offtopic:I'm having trouble understanding this line, so you're initializing s with "01..yz" but what does the [code][value % base] + s[/code] part actually do? | |
So it's this program which isn't behaving as it should. these are the classes I'm haing problems with: [code]#ifndef _CMENU_H_ #define _CMENU_H_ #include "Vec2.h" #include "Background.h" #include "Sprite.h" #include "BackBuffer.h" class Button { public: enum ButtonState { NORMAL, //when cursor is not near the button ANIMATED //mouseover event }; Button(const … | |
just as the title says i have a problem with serializzing class which has a pointer to class. so this is a mock-up of my class structure [code] class X{ private: int number; public: int set_number(int); int get_number(void); //I'm defining the stream operators so class will act as primitive data … | |
so these are my structures: [CODE] struct information { int Id; char name[20]; }[/CODE] that structure I use in my tree structure [CODE] struct node{ information *employee; node *left,*right }[/CODE] and I have a generating function: [CODE] node* generate_tree_from_file(void) { node* tree=malloc(sizeof(node)); employee* emp=malloc(sizeof(employee)); int NoEmployees; FILE *input_file; input_file=fopen("emp.bin","r"); if(input_file) … | |
As the title suggests I need to write the class of a graph object. It is required that I write a function that prints the graph determine if the graph has conex components,what are the cinex components, if the graph has cycles, and to determine the shortest and longest road … | |
So I've implemented the binary search tree but i get an error from the insertion function this is my code: [CODE]#include<iostream> #include<stdlib.h> #include<malloc.h> using namespace std; struct NOD{ int inf; struct NOD *left; struct NOD *right; }; NOD *root; bool Erase(int nr); void Insertion(int nr); int Search(NOD* node,int target); void … | |
I need to implement a function which ads elements to a single linked list: -if the head(first element) of the list doesn't exist(if head is NULL), then the added(inserted) element becomes the head(the the data entered is of string type) -if the head already exists, insert it after the last … | |
Hello everyone, I'm not that much of a talker so I'll get straight to the point: I need to implement a hash table in C++, After reading about this topic and algorithms from the book by Cormen, I started to implement it. I wrote it, but it doesn't work how … | |
The End.