- Strength to Increase Rep
- +9
- Strength to Decrease Rep
- -2
- Upvotes Received
- 73
- Posts with Upvotes
- 62
- Upvoting Members
- 38
- Downvotes Received
- 12
- Posts with Downvotes
- 12
- Downvoting Members
- 3
My professor assigned a problem from our OS book about matrix multiplication. Its pretty simple as the book shows how to do most of it. But now my professor has added an extra layer of difficulty. Instead of declaring the multidimensional arrays globally he wants us to input the size … |
|
Hello, Please tell me how to implement multi threading in C++ on Ubuntu 10.10. The compiler I use is GNU 4.5.2. I have some knowledge of multi-threading in Java. Explain with some codes if possible. Or please give the URL of any useful stuff |
|
Hi, Im trying to connect to a database but it doesn't seem to work. This is the code I'm using: [CODE] #include "stdafx.h" #include <iostream> #include <my_global.h> #include <mysql.h> using namespace std; int main(int argc, char **argv) { MYSQL *conn; conn = mysql_init(NULL); if (conn == NULL) { printf("Error %u: … |
|
hye..its kinda easy..but i still cant solve it.. [QUOTE]1.Write a program that has an array of at least 10 string objects that hold student’s ids and names, you may make-up your own strings or use the following: “1000614921, Abdulkadir Musa Jibrin” “1000717859, Abdulwahab Ali Esmail Al-Nawah” “1000716597, Ahmed Ebrahim Mohammed … |
|
Well, i'm pretty much a newbie into programming, merely because i'm just 15, but i really like informatics ( specially programing ) but i'm not that wealthy so, i can't pay for private teaching, or anything like that. But if you want to, you can, that's what i say. I've … |
|
I have a pure virtual base class called IVSystemDLL. I also have a class called CVSystemDLL which inherits from IVSystemDLL. When I create a [icode]new[/icode] CVSystemDLL and convert it to a IVSystemDLL *, and try to use one of it's functions, I get an access violation. It's not something inside … |
|
hey everyone, i am attempting to create a simple dll in c++ that creates a timestamp, in the following format... [B]17042011233200[/B] Which is: [B]17/04/2011[/B] @ [B]23:32:00[/B] thus far, i have found a code ([B]see below[/B]), but after compiling with devc++ it doesnt seem to work, i am new with dll's … |
|
Hi all, I am constructing a program on TCP sockets. The server should be able to accept connections from more than 1 clients. My programs seem working fine when accepting connections. Now the problem is: when I try to terminate one of the client programs, the server program would also … |
|
I recently received an 'A' on a program I submitted for the programming course I'm currently taking. I'm on spring break and I was hoping to use my spare time to do some studying, so I took my 'A' program and tried to run it in Visual Studio Express, and … |
|
Title says it all, basically I'm just trying to print the pointer *p to display all the values in that array. [CODE]#include <iostream> #include <string> //#include <stdlib> using namespace std; void extend(double *p, double *q, double *a, int c); int main() { const int CONST = 10; double price[CONST] = … |
|
|
I am currently a C# developer with about a year of experience. I am currently working on finishing my computer science degree with a minor in mathematics. I love the job that I am in, but I the things I really want to do are in C++ (i.e. game development, … |
[CODE]#include<stdio.h> #include<stdlib.h> #include<string.h> void main() { char* a[10]={"asd","QWE","ghj"}; printf("%s %c",a[2],a[2][2]); // prints properly... "ghj j" puts(a[1]); //prints properly..."QWE" a[1][1]='t'; //gives segmentation fault.... }[/CODE] what is the mistake in the code...??/..pls help..have an exam in 6 hrs...thank you.... |
|
I have several questions regarding OS programming. 1 - How do they write Operating systems? 2 - Do you know what compilers is used to do that (or library)? 3 - Do they have to burn it to a CD and reboot the computer every time they test it? 4 … |
|
Is there a way to gather network/internet traffic statistics? The end result is that I need to create a random number generator using some network stats as a random seed, so I need to pull information that is highly variable. Could be packet data (maybe sequence numbers), or traffic data … |
|
In Java and c# you can get the total lenght of an array with array.length or simular. Not only the length of the filled elements, I want the length of the total array. Lets say the array is introduced as this. [CODE]string array[100];[/CODE] Maybe its half filled or not it … |
|
1.[CODE]int _tmain(int argc, _TCHAR* argv[])[/CODE] 2.[CODE]wprintf(L" ----------\n");[/CODE] This is syntax that I get when I make any Win32 Console Application in Visual C++. I cannot understand what are _tmain(), argc, _TCHAR* argv[]. Till now I have been dealing with void main() and int main(). I also want to know what … |
|
Is there ANY EVER reason why i would return an object or variable by reference? to me this doesn't make sense and is very bad. |
|
I need to read data from a file into an array of structs. The info is arranged in the file like so... Spear of Extreme Whaling January 1851 Captain Ahab Each member of the array has a name, month, year, and first and last name of creator. This is the … |
|
i make twwo single linkedlist,, but i didn't know how i can merge those lists ;; [ICODE]#include <iostream.h> class linklist { private: struct node { int data; node *link; } *p; public: linklist(); void append( int num ); void appendd(int size); void display(); }; linklist::linklist() { p=NULL; } void linklist::append(int … |
|
Hey guys, so I just started learning computational geometry, and I decided to make a class for a Point and a class for a Ray. This is my code: [CODE]#include <iostream> #include <string> using namespace std; class Point { public: double x, y; Point(double x, double y) { this->x = … |
|
I have been reading the 'inside the c++ object model' by Lippman and one of the sections has me a little confused. It is the section where the author explains how virtual tables are created and virtual pointers assigned, in the scenario of multilevel, single inheritance. If anyone here has … |
|
Hi, I am trying to write a program for my mum who is a teacher, the program needs to be able to store students information like their name address SAT scores etc. I have a basic background in c, but i decided to try and implement this program using c++. … |
|
so what i'm trying to get my head around it say i have a vector of vectors containing some unsigned chars and i want to copy a certain vector to another vector as follows. [CODE] std::vector< std::vector< unsigned char > > foo; std::vector < unsigned char > bar; for (int … |
|
Hi! For the past few months I've been self-learning C++ with the book "C++ Primer Plus" by Stephen Prata. After having gotten through chapter 7, I decided to check my progress by writing a little program, Baztro. Baztro stands for Basic Astrology Tool. It asks you for birthdate(s) and will … |
|
Hey all, So i created a program that performs matrix addition and subtraction. It compiles but when I try to run it, it shows "SEGMENTATION FAULT" Help Please! Here are my codes: Matrix.h [code] #ifndef MATRIX_H #define MATRIX_H class Matrix { private: const int numRows, numCols; int **data; public: //constructors … |
|
Hi, I have a list of base types which stores multiple derived types. The following code shows a simplified setup. [CODE]#include "Base.h" #include "DerivedA.h" #include "DerivedB.h" #include <iostream> #include <list> void main() { std::list<Base*> base; std::list<Base*> *basePointer = &base; for (int i = 0; i < 10; i++) { basePointer->push_back(new … |
|
I was wondering if I partially specialize a class (which I'm understanding to mean hardcode some of the template parameters?) if I have to implement all functions or if I can just implement some functions. I put together a demo: [url]http://programmingexamples.net/index.php?title=CPP/Templates/PartialClassSpecialization[/url] Where in the main class definition there are two … |
|
can anyone explain why the output of this code is 110 ? [CODE]// Assignment 1-Body Mass Index Calculator #include <iostream> //allows program to output data to the screen using namespace std; //function main begins program execution int main() { int total=0; for (int number =2;number<=20;number+=2) total +=number; cout<<"Sum Is"<<total<<endl; return … |
|
Hi everybody, can someone please explain what is the difference between line A(10) and line B(11).why am i being able to access value of n without using de-referencing operator in first case? [CODE]void fun(void *n) { printf("\n n=%d ", n); } int main() { char nVal = 65; fun((int*)nVal); //-----A … |
|
after finishing books of thinking in c++ vol1 and voL2 , ı decided to read c++ programming language 3rd edition by stroustrup. Do you think that it is appropriate? |