49,761 Topics
| |
[CODE] #include<stdio.h> #include<conio.h> #include<stdio.h> void maketree(struct node**); void inorder(struct node**); struct node{ struct node *left; struct node *right; int data; } void main() { struct node *root; root=NULL; printf("Enter root"); maketree(&root); preorder(&root); getch(); } void maketree(struct node **root) { int num; struct node *temp; if(*root==NULL){ //printf("Enter number"); scanf("%d",&num); temp=(struct node*)malloc(sizeof(struct … | |
Hi all... I tried the following code in my Turbo C++ .. [CODE]int j=5; cout<<++j + ++j + j++;[/CODE] and got the result 20, as expected. But, when I replaced the code and assigned the same to another variable x, it gives result 21. ie, [CODE]int j=5,x; x= ++j + … | |
Hi guys, i try to write a containment program with Date and Time classes, i have problem in operator loading in Date_Time.[CODE] class Date{ short d, m ,y; public: Date(); Date(short date, short month, short year); ~Date(); short Day() const; short Month() const; short Year() const; };[/CODE] [CODE] Date operator+(Date … | |
I am rewriting in Visual Studio 2008 c++ an application written in VB.NET that successfully connects to an oracle 10g database using OracleDataAccessClient.dll. I am trying to utilize the same dll in the c++ app though very unsuccessfully. In the project's Property Pages, I have successfully referenced the dll. In … | |
how to make our c++ application bootable ? so we can boot from usb .... ? please help my friends i have searched a lot on internet but couldn't find appropriate thing ? thanks in advance ? | |
Hi.. I would like to use microsoft visual studio C++ 6.0 to build a execute file to detect whether network drive is connected and ready to used.. can anyone of you teach me how do I do this..?? my situation is I have 2 PC connect using LAN.. PC A … | |
Hi! I created a primitive login system and am wondering if I could somehow not show the actual password and instead asterisk. Here is the code : [CODE]#include<iostream> #include<string> #include<vector> using namespace std; int main() { string username; string password; cout << "Do you want to register?" << endl; cout … | |
Please note that I mean overlapping windows in a literal sense, not in the DWSTYLE sense listed within this very function. I've been having this problem for quite a while now whereby I create a number of windows using the above function and have been having issues with the main, … | |
Dear friends ? I have searched a lot on net but i couldn't get any best articles.. I want to use mysql in my c++ applications . please provide a detail procedure for using mysql as database in c++ ? thanks in advance ... ? | |
Hi guys, pls somebody tell me the detailed concept of containment in c++. its urgent pls.................. | |
I just recently finished my CIS101 and 201 classes for C++. My instructor says i show alot of promise and i really enjoy coding. but here is my problem: The semester is over and this next semester i won't be taking any CIS classes(need to get some general edu out … | |
ill show the problem in the book first then ill tell you what i know. ___________________________________________________________________________ Then following formula gives the distance between two points (x1,y1) and (x2,y2) in the Cartesian plane: √ (x2-x1)^2 + (y2-y1)^2 its the distance formula..hard to type on here Given the center and a point … | |
how to make a simple password lock in c++?? i want a alphabetic lock btw thanks for helping | |
I started to do some reading about template, found interesting example [code] template <class T1, class T2> bool GetItUP (T1 a, T2 b) { return (a>b?a:b); } [/code] And the way to use it: [code] int _tmain(int argc, _TCHAR* argv[]) { int a = 20; float b = 23.90; GetItUP<int,float>(a,b); … | |
Hello all! So basically I start off with one array, then I run a function that takes 3 floats, puts those 3 floats into a temporary array, then it returns this new temporary array and where I call this fucntion, It looks like this: [CODE=c++] float array [] = { … | |
Hi, I'm very new to C++ and i'm trying to find the best way to solve this problem: First, i want my program to generate a random 6 digit integer as a variable (i have this part done).This random integer is the variable [B]x[/B]. After that integer is done, the … | |
Hi , I am trying to call c++ exe from java applet.For this purpose am using processbuilder.My code is as follows ProcessBuilder pb = new ProcessBuilder(s); Process process = pb.start(); final InputStream is = process.getInputStream(); OutputStream out = process.getOutputStream(); PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(out))); pw.println(1); pw.println(1 +"" +2); … | |
Hi Guys I need to compile and run a c++ program from java using Process a = Runtime.getRuntime().exec ("g++ -g function.cpp -o function"); Process b = Runtime.getRuntime().exec ("./function"); the problem is that the output I get from the c++ program is not correct but If I compile and run it … | |
im trying to learn c++, so i stumble upon this programming exercise that asks the user to make a program that asks for 2 numbers, assuming that the second number is always the biggest in value, and adds all of the numbers in between the numbers entered including the entered … | |
Just recently, I have upgraded from gcc 3 to gcc 4.5.0. However, when I try to compile a basic "hello world" example in c++, I get the following warning: Info: resolving std::cout by linking to __imp___ZSt4cout (auto-import) c:/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/bin/ld.exe: warning: a uto-importing has been activated without --enable-auto-import specified on the c … | |
1. My bigInt multiplication [B]does not work correctly [/B]it gives me the wrong output. 2. Also how do i modify the class BigInt to process both positive and negative large integers? Merci beaucoup to anyone that helps! Here is my code BigInt.h [CODE]/*-- BigInt.h ------------------------------------------------------------- This header file defines the … | |
Hello all! I am trying to create a simple app that takes something from an mysql database and prints it, I had some problems with the libraries at first, but now it compiles and shows me the black console window, but then suddenly it gives me some errors and in … | |
Hey, i have read "Accelerated C++" and i am "soon" done with "The C++ Standard Library". I would like to learn about Windows Forms Applications or something similiar where i can start creating more useful programs. Can anyone recommend anything? Is it too early for me to jump to this? | |
I am learning stacks, and I am trying to get this program to work. I have to be able to add large integers such as 9999999999999999999999999 by pushing all the numbers on the stack and then adding them up. Currently it works with small numbers but large numbers it crashes. … | |
I am new to C++ and have a problem in a class I am taking.I am having trouble trying to create this the way my professor wants. this is what is required from the program: Write a complete program that prints out a “tree” of asterisks with the number of … | |
I wrote the tic tac toe with minimax algorithm. However, there are some bugs that i cannot figure out why the computer cannot win the human. Please help me to fix it. Thanks. I upload a zip of all files for you to check it easier. I guarantee that it … | |
This may sound like a silly question but does when using aType is it just means any type ?? | |
I know this is a horrible way to do this, but I'm trying to test out several things that I've learned at once in this code. It's meant to ask you how many numbers you want to add using dynamic memory, then push them on to the stack, and add … | |
Hi Have been using OpenGL with Borland C++ Builder 4 for about 10 years but need to port across to Embarcadero C++ Builder 2010 and am developing on generous W7x64 platform. I cant remember where I downloaded the original package from but I need a new package containing the right … | |
Hi Guys, I need some help in accessing elements from a list. I am using Visual Studio 2008 (c++). Here's my code: [CODE] using namespace System::Collections::Generic; public ref class Cord { public: int numCord; public: int x, y, z; }; public ref class Poly { public: Cord c1, c2, c3; … |
The End.