49,761 Topics
| |
please can anyone help me in writing code for the below question in c++ as am weak in c++ a. Write and test a function for the vertex-insertion algorithm (insert a new vertex, given a specification of all vertices adjacent to it) | |
Hello, This is the problem: I get the right function call only from the 3rd derivated class, when the other twos are called are not. Source : [code] #include<iostream.h> #include<conio.h> #include<string.h> class IV{ char *loc; public: IV(){loc=NULL;} IV(char *_loc){ loc=new char [strlen(_loc)+1]; strcpy(loc,_loc); } ~IV(){ if(loc) delete [] loc; loc=NULL; … | |
Using Dev-cpp, a small program compiles but the resultant .exe file does not run. From the DOS command, it runs. When I try from the windows run command , it flashes but immediately goes away. | |
i have just one question: can a function return array? | |
Hi, Can I check a two-dimensional array like this ? The content of the arrays are of type [I]char[/I] [code=c++] matrix[0][0] == matrix[1][1] == matrix[2][2] [/code] | |
Hey, I am creating a project that writes to a file. The problem is that I don't want it to write to a file on my computer but to a file on my server. I am using this [CODE]ofstream myfile ("www.myurl.com/test.txt");[/CODE] What I want to do is open that file … | |
Hi, I'v tried to compile a small test program with cc/gcc but I'v got the following error: /tmp/ccD16111.o<.eh_frame+0x11>: undefined reference to '__gxx_personality_v0' collect2: ld command 1 exit status I did EXACTLY as in the book. What can I do ???????? [code] #include<stdio.h> int main(){ printf("0"); return 0; } [/code] [email]cvv3@yahoo.com[/email] | |
I know there is [i]a lot[/i] of threads about books but i didn't find what i was looking for:) so here goes. how is the book ^^ made? does it explain the commands? becaus im a bit fed up with tutorials that just say "write this and write that" when … | |
calling C/C++ function from perl from : [email]cvv3@yahoo.com[/email] Hi, how do I call a compiled C/C++ function from perl ? Let say I have a C/C++ function: [code] *char func(char *ptr, int len) { ... return str;} [/code] Now i wonna call it from perl | |
please tel me how to use my classes declarations and definetions in c++ with vb.net | |
I am passing 2 Strings^ from Form2 to Form3 when I open Form3 so I can get these in Form3 in the code below. This works fine. [COLOR="Green"]//In Form2, I pass along 2 String^ to Form3[/COLOR] [code] [COLOR="Green"]//Passing along n1 and n2[/COLOR] Form3 ^form3 = gcnew Form3 ( Convert::ToString(n1), Convert::ToString(n2) … | |
I have a wstring variable which holds a value of a time("20090106103842") in the format YYYYMMDDHHMMSS. How can I convert it to a time_t format | |
I am just curious, just how much of math do one really needs in order to make, say space invaderes, or pacman....WOW,..NBA LIVE 2009? It's not that i am bad at math or anything, in fact I am pretty good at it and still learning, calc.II. BUt i am curious, … | |
Hi, I'm programming a simple line editor but I'm running into 1 issue that I just can't seem to figure out. I'm not the greatest at C++, if somebody could have a look I would be grateful. Basically I have this Main... [url]http://pastebin.com/m6e249679[/url] Then I have this source file... [url]http://pastebin.com/mdb671dd[/url] … | |
Hello It would be great if someone suggest me a library for handling configuration files.Is there a general method for this job? PS:i need it for *nix platforms Thanks in advance. | |
I know i can use fstream to create, edit and read files in c++, i also believe there is a different way wich i am unfamiliar with. but is it possible to work with files NOT in the same directory as the program? like if the program is in C:\programfiles … | |
Hello, I'm quite new here, but there's a problem that needs solution. I think the title says exactly what I want to do. I need to use C for a reason I don't think is this important to mention. I tried searching Google, and found the same solution on most … | |
I have created one binary file in c that save btree. File is having huge size around 2GB. If some one changes this attribute to read only, then b tree is updated incorrectly. And the behavior of code changes. I need to write a code, so that no can change … | |
hi, How can i pass a stack to the function. I am getting compilation error. Following is my code. [code] class circuit { public: int append_and_file(stack<int> &); /* Some other variables defined */ } int circuit::unroll() { append_and_file(add_stack_ppi); } int circuit::append_and_file(stack<int> &stack_ref) { int var=0; int num_clauses = 0; stack_ref.push(2); … | |
Hi ! I am creating one application and I want to change the background of my button. How can I change my button background and put image in background ? | |
Hi, i'm looking for some library that provides solving matrix determinant. My matrix contains complex numbers (complex.h). Please write me some hints | |
Hi all, I have tried to write a program which can add two matrix. It is running well....but when I am printing out the resultant matrix it is just showing the address of the resultant elements. For convenience, I have posted the output also. [B]Program:-[/B] [code=cplusplus] #include<iostream.h> int main() { … | |
I tried Googling this to no avail: how can I request the used space/ total size of the hard drive? In this case it is safe to assume that the machine will be running Windows. | |
This is my first C++ program that I put any serious effort into. You may have seen the trick that allows you to start explorer.exe as the SYSTEM user (by running "at /interactive xx:xx explorer.exe", adding 1 minute to the current time). It takes a lot of jumping through loops, … | |
Hi, I have a problem with the use of vectors. As you can see, the program asks the user for a row of positive whole numbers. These numbers will by put in a vector called "getallen". Than the numbers in "getallen" will be sorted by the function "sorteerint" and number … | |
Hi there. I have to modify some variables stored in a pointer say xx. From VC++ debug Watch Window, I can expand xx to several data ([yy], _a1, _a2, etc). So, when I add xx->_a1=0.22 (it is a double type), it is OK. But, when I try to do xx->yy=0.34 … | |
hi, i need some help with adding numbers in array. the arrays are the same size, but the new array must be the same size as the first two. i know how to add two arrays but i don't know how to make the case for bigger size and say … | |
hello, i'm trying to to get the time of my sorting function in seconds, and i always get ZERO time. here is what i'm using: [CODE=C]clock_t t1,t2; t1=clock(); clock_t IT I.insertion(A,200000); t2=clock(); IT=((t2-t1)/ CLK_TCK)*10000000000000000000;[/CODE] i print the IT and get ZERO. can someone help me with that issue? | |
#include<iostream> #include<fstream> #include<cmath> #include<iomanip> using namespace std; /* 215 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 2^1000? */ //my logic is to export 2^1000 into a text … | |
Hi. I have a problem with my SDI application. When I start Telnet, I can connect or disconnect to my server app with no problems, but when I send something to it.....nothing happens. I have an OnRecieve() function in my custom socket class so I can't understand where my mistake … |
The End.