48,986 Topics

Member Avatar for
Member Avatar for Andrew Davis 64

I have no idea how C++ works, but I'd like to learn... Is it possible to create java files/programs using C++?

Member Avatar for geojia
0
206
Member Avatar for .:Pudge:.

What is the greatest possible range of rand()? I want to make it that of a long signed integer, but my program crashes. Is there another way to get that range?

Member Avatar for Tellalca
0
101
Member Avatar for noname1810

Hello, everybody! I'm writing a code, which should be able to insert a node to a binary tree where specified. Commands are being loaded from a .txt file. The contents of the .txt file are the following: 1 L 1 2 R 1 3 L 2 6 R 2 4 …

Member Avatar for Tellalca
0
156
Member Avatar for tKc

I am trying to write a program that dynamically increase the size of an array. essentially creating an array inside of an array with array [b]a[/b] storing 100 int pointers. my code is initially having problems on line [code] a[count] = new int [n]; [/code] any tips or pointers as …

Member Avatar for Tellalca
0
152
Member Avatar for tegaelam

Hi! I saw a post on this site that exhibited the same exact problem that I have for a homework assignment and while it was solved, my issue with the homework assignment is different. The C++ program that I wrote asked the user to input information but once you enter …

Member Avatar for tegaelam
0
623
Member Avatar for bkempert

Hello everyone, I've used this website many times to help myself based off of others' questions, but now I have a problem of my own that I can not solve. I was assigned the task of creating a stack program in C++ using a linked list. Seems simple enough, but …

Member Avatar for bkempert
0
131
Member Avatar for gizmo7008

I'm making a student database using array based lists. I'm having trouble with making the list size created by the user. I have a for loop there now but once I put it there, I get an error saying aStudent is an undeclared variable and I don't understand why. There …

Member Avatar for gizmo7008
0
440
Member Avatar for Eshagul

Hi! guys i am a beginner and jus wanna know Using if else or switch operators i need to know the c++ code for writing a program that accepts a character and determines whether the character is lowercase letter

Member Avatar for geojia
0
52
Member Avatar for amoony

Hi every body I have about while loops and I just answered Q: a & b plz help me [QUOTE] **Write a program that user while loops to perform the following steps: a)Prompt the user to input two integers: firstNum and secondNum. (firstNum must be less than secondNum.) . b)Output …

Member Avatar for amoony
0
863
Member Avatar for KellieD

I'm trying to write a progam that; Contains a function called sumN() which takes an int n as an argument and returns an int which is the sum of all integers between 1 and n. In the main() asks the user: How many values (s)he wants to enter (maximum 50); …

Member Avatar for SgtMe
0
152
Member Avatar for .:Pudge:.

I am having trouble printing the contents of a b-tree of order 'n' in level order. I have looked at algorithms online, but they only cover trees that have nodes with only 2 children. Shouldn't it also be called recursively? No algorithm I found used recursion. [CODE]void addToQue(struct node *root) …

0
50
Member Avatar for javac++

i neeeeeeeeeeeeeed help please Create code that: * stores the x and y coordinates of the mouse into two arrays x[] and y[]; * the size of x and y should be 50; * the latest coordinates (from mouseX and mouseY) should be stored in position number 0 of the …

Member Avatar for jonsca
-1
71
Member Avatar for purohiti

So i have to create a program which reads the number of days in the month and the temperatures. This info is in other file, temp.dat. I have how to calculate the average temperatures, but am having trouble reading from the file. Also, for every day that is in a …

Member Avatar for jonsca
0
86
Member Avatar for Tecnicrow

I'm having problems trying to implement a counting sort for a template linked list. I already coded everything and I get the correct output. Now I just need to sort using counting sort method. When I run the project, the program crashes and it says: First-chance exception at 0x00262805 in …

0
69
Member Avatar for natha_peepli
Member Avatar for Stefano Mtangoo

Hi, I have a complex C++ code with gui. Each major gui division is independent class. Now these classes must 'talk' sometimes in operations like copy from division A and paste in division B. So I need to pass some pointers from one class to another. I was thinking of …

Member Avatar for Stefano Mtangoo
0
103
Member Avatar for anantk

I am aware that this is something that has been asked repeatedly, and that conio is outdated, it is completely non-standard, but I need do use BGI graphics(in Turbo C++ 3) for my school project and for that along with BGI I need conio too.. I convinced my teacher to …

Member Avatar for anantk
0
119
Member Avatar for zozanthonyzoz

Hi all, I need to have a program to word count remove punctuation and sort it in alphabetical order. I had done the word count portion but i am lost in removing punctuation and sorting in alphabetical order portion. Hoping to get some help. [code] #include <fstream> #include <iterator> #include …

0
150
Member Avatar for MasterMic

First I'd like to say how much I appreciate these forums. They have helped me before, but this is the first time I've posted a question myself. My problem is that I use a different IDE than my teacher does (probably not the best idea) so I want the program …

Member Avatar for MasterMic
0
223
Member Avatar for bookmark

Why won't this output my string vertically? THanks in advanced, bookmark. [CODE]#include <iostream> #include <string> using namespace std; void print (const string & s); void main(){ print("blah"); system("pause"); } void print ( const string & s){ int i; int clrscr(); for(i=0;i<4;i++) { cout << "\n %c", s; } } v[/CODE]

Member Avatar for natha_peepli
0
99
Member Avatar for MasterGberry

I seem to be very bad with playing around with pointers. Basically the specialization template is supposed to return the address of the longest of the 5 strings provided. I keep getting an error on line 20 about char vs char *. Please some help, a good explanation on the …

Member Avatar for MasterGberry
0
99
Member Avatar for MasterGberry

I am having a similar issue [CODE]// Exc_3.cpp - Testing string with refernece #include <iostream> #include <cctype> #include <string> #include <cstring> using namespace std; string lowerToUpper(string & ref); int main() { string str; string constant = "q"; cout << "Enter a string (q to quit): "; //while (constant != getline(cin, …

Member Avatar for MasterGberry
0
130
Member Avatar for Vgwizardx

This is my first group project me and one other person wrote the majority of this program. I put message on the functions and other things i need help on. It seems to work a little bit but I'm not getting the correct values when I try to run this …

0
63
Member Avatar for lochnessmonster

i currently am throwing an exception in my constructor of my class and i read that when u do such a thing, the objects destructor is never called! meaning if i allocate any memory without using the heap, i have to MANUALLY deallocate the memory myself. An article i read …

Member Avatar for vijayan121
0
179
Member Avatar for shanker86

Hi all, I have a silly question regarding how to translate this command in CMakeLists.txt g++ x04.cc -o demo -lplplotcxxd x04.cc is c++ file , information about lplplotcxxd can be found here [url]http://ubuntuforums.org/showthread.php?p=8538977[/url] since the command " g++ x04.cc -o demo -lplplotcxxd" is working on my computer so I think …

Member Avatar for shanker86
0
168
Member Avatar for yznk

[CODE] #import <iostream> #import <string> #include <fstream> using namespace std; //The phonebook itself. class Book { public: int people; //The information for a person. class Person { public: string firstname, lastname, phonenumber; }; //Returns 1 if Person1 comes before Person2, 2 if Person2 comes before Person1, and -1 if they …

Member Avatar for geojia
0
329
Member Avatar for geojia

Hi, this is my first time posting and I would like thank everyone in advance. I'm doing a homework assignment that requires me to design a teller application which simulates a bank. I'm currently getting a segment fault, after I call one of my getBranch(). I've tried to do this …

Member Avatar for geojia
0
177
Member Avatar for imprezal2345

I've finished a void display function for an in-game menu. I'm trying to have the menu stay at the top of the cmd for the length of the game. However, since it's a separate function, the program stays in the menu function, and never reaches the functions that follow it. …

Member Avatar for imprezal2345
0
1K
Member Avatar for dvspinay

I have been tearing my hair out over this, and I have written and rewritten the code over and over again. If I can get some kind of direction or where to start, it would be awesome! I put something down there that I have tried for one of the …

Member Avatar for arkoenig
0
127
Member Avatar for makingafire

Hi all. I am having trouble with my code. I have played around with it for a while, and I just can't seem to get it. The only thing I am having trouble with is it getting to output the a.m. and the p.m. correctly. [B]it always outputs p.m. no …

Member Avatar for gerard4143
0
109

The End.