49,761 Topics
| |
Probably a dumb question but, How can you tell if a "split" has occurred all the way up a btree? Would it be that the parent pointer would be NULL? Like I said probably a dumb question. I've got my BTreeNode class working (including the add) but the BTree class … | |
Hello, For this program I have to read a random phrase from a file which will contain an integer at the top describing how many phrases are in the file and then each phrase is blelow that number on a seperate line. I need to select a random phrase from … | |
I'm new to the code blocks ide. How exactly do i change the colours within the code window? Also how do i make code blocks portable as i use it on a number of different computers. any help would be much appreciated >_< | |
i have written a series of programs in c++ that do various things with dates and the likes, i now have to write a piece pseudo-code that can be used for data checking, abit stuck on how to even start. BEGIN CALL validDate = true CALL validmonth = true IF … | |
[CODE]#include <iostream> #include <iomanip> //for formatted output #include <string> //for strings using namespace std; //named constants const double CENTIMETERS_PER_INCH = 2.54; const int INCHES_PER_YARD = 36; const int INCHES_PER_FOOT = 12; //function prototypes double toCentimeters(int, int, int); void fromCentimeters(double, int&, int&, int&); char inputData(int, string&, double&, int&, int&, int&); void … | |
Hello, i am a beginner and need your help. The little programm should run and close another aplication(this works without the loop) every x seconds but it doesnt work :( . Thank you for your help. [CODE]#include <stdlib.h> #include <time.h> #include<iostream> void start (int); using namespace std; int main () … | |
Hi there, i have this rectangle and i want to be able to rotate this shape around another when i press a key. i have been able to make it rotate where it is. There are two problems i am having difficulties with: - I can get the shape to … | |
I cant figure out how to import a file which contains the price of an item. and once i import the price idk how to put it in my program. AND I DONT TO USE IT AN ARRAY. I AM IMPORTING EACH ITEM ONE AT A TIME. [CODE]void main () … | |
i would like to get date and time of button event. Here is the code that is writing the input from textBox11 into text file when the button 5 is clicked. Can anyone help me advice how to write the data and time into this text file when the button … | |
Just wondering if this is possible, basically I have some stored values that I want inserted into the middle of a URL in my C++ program. I then want the program to open up the URL with inserted data into the default browser. If anyone could give me any info … | |
how could I creat a file at desired folder? Below is my code and what I want to do is 1)I open the "newfile1.txt"and read the first line(e.g Cat) from this file 2) and then create the Cat.txt at "C:\user\user\Desktop\history" Currently, I could creat Cat.txt at the folder where my … | |
I need run a c++ method from my python program but the c++ method need a few parameters what need for call that method in my python code with the paramethers | |
write a recursive function to reverse an integer number | |
Hello. I have a small problem in my home assignment. A neverending loop occurs, if user enters everything but digits, when I expect him to enter only digits. How do I allow only int type variables to be entered by user? The value user enters is the index number of … | |
hi I'm Maryam can you help me to draw this shape * * * * * * * * * * * * * * * ** three triangles with the same base. | |
I want to print to a word of length n in a string .Using by C ++ langues.I have not know funtions in string.h support that. i'm happy when you help me! thank you | |
Hi! I'm trying to use the nanosleep and sleep functions in a program I am trying to write. I first tried this - [CODE] fprintf(stdout,"Hey guys.."); struct timespec t_req, t_rem; t_req.tv_sec = 1; t_req.tv_nsec = 500; if (nanosleep(&t_req, &t_rem) < 0) return 0; fprintf(stdout,"...What's up?");[/CODE] Since the function nanosleep did … | |
I am trying to get into the course to get an advanced diploma in professional games development, and I need to present a program to demonstrate my programming skills. Can someone give me some suggestions of a program to make that demonstrates that I know C++? | |
[CODE] void MatchWord(Match temp, int duplicatedoc, int originaldoc, string * words) { Idea is to send in a match and then call the binary search on the matching words and see if they are found. If they are found, give them a higher weight and if not found, give it … | |
I am attempting to write some code that will open a sequintal file into arrays and will then can use the data to calculate monthly payment. the text file is as follows 1 5 10 20 50 2.5 4.1 5.3 7.1 8.3 With the top row being yrs and bottom … | |
So my teacher has a quiz question and his practice question for it is for us to code the strcpy function for character arrays assuming acceptable ones are passed. I have written my version and just want to see if it you see any errors in it. Or even if … | |
My assignment is to find the sum of an array, sum of the cubes of the array (i.e. each value raised to the power 3) and the variance of the array. At the moment I'm getting compilation errors so I can't do any trial and error. My problem conceptually is … | |
I'm having some trouble translating the following C++ program to Pep/8 assembly language. Can anyone help me solve this. This is what I have come up with. [code=cplusplus] #include <iostream> using namespace std; int list[16]; int i, numItems; int temp; int main() { cin >> numItems; for (i = 0; … | |
ok, i have a bigger problem. when i run the program (something like this); "Which swimming instructor would you like to choose? Enter j for Jeff, Enter a for Anna j Please enter the first letter of the day of the week you would like to schedule. M for Monday, … | |
I was wondering how to make a program to open a specified file just by entering its location. What command do would i use to open it instead of double clicking on the file. Thanks in advance. | |
OK, i can't figure out what kind of mistake I've done. Can somebody help me please. [CODE]#include<iostream> #include<iomanip> using namespace std; void scedulejeff (char [][4]); void sceduleanna (char [][4]); void Print2DArray(char [][4]); int main() { char jeffarray [4][4]; char annaarray [4][4]; char instructor; cout << "What instructor would you like … | |
Hello.. I m doing my project in vc++ CLR windows form.. I m using vc++ 2008 express edition.. When I click button of my form , i wanna include a pop window.. I m not getting any syntax to include pop window.. As i m beginner to vc++ , i … | |
ok I'm confused... my class is empty, apart from an inclusion file, but has alot of errors that i cant understand.... Here's the .h file: [CODE] #ifndef creator #define creator #include "stdafx.h" class creator { public: creator(); ~creator(); } #endif [/CODE] And here's the cpp file: [CODE] #include "creator.h" creator::creator() … | |
Hello :) I've got this resource (as in files on the pc) management system, that had been tested but now seems to be malfunctioning. I've been debugging for way too long now, and I can't figure out the issue. I'm going to post some of my code first, and then … | |
Does anyone know of a good way to sort an stl map? I have something like the following example: [code] #include <iostream> #include <map> #include <algorithm> int main() { map<int, float> map_to_sort; // Populate the map with between 20 - 2000 elements map_to_sort.sort(); } [/code] Obviously I am aware that … |
The End.