49,761 Topics

Member Avatar for
Member Avatar for Gorozco925

I am new to C++ and I am having problems with my code as you may imagine. As a newbie, I am creating an application in which converts celsius to fahrenheit and vice versa. The application has to ask what the user wants. I set up the application to run …

Member Avatar for WaltP
0
195
Member Avatar for valestrom

Hey, I have a volume/surface area calculating program, but the problem is that my program always runs through the first possible choice instead of choosing between two. It will always do the cube/rectangle function instead of going to the square pyramid function. Here's my code. [CODE] #include <iostream> #include <windows.h> …

Member Avatar for WaltP
0
149
Member Avatar for avgvstvs

[CODE] cout<<"\n\n Please Input The Drive Letter Of Your Input Device \n"; cin>>DRL; string str(DRL); string str2(":"); string src; string hi; src=str.find_last_of(DRL); cout<<src; if(src!=str2) { hi=string(DRL)+string(str2); cout<<hi; } else*/ cout<<hi; [/CODE] [What am i dong wrong.i am trying to enure a colon input in the drive letter regardless of user …

Member Avatar for avgvstvs
0
1K
Member Avatar for triumphost

Hi guys. I have a php script that reads some values off a website and prints to a file every second.. The thing is, the script is always ran in my browser and I don't like that. I want to write a c++ program that can run that script within …

Member Avatar for thines01
0
357
Member Avatar for DoinWork

Hi, I'm trying to put together a recursive function to count number of internal nodes, but I can't seem to grasp how to just grab internals. Any help? This so far only seems to count number of nodes [CODE] int numI(Node* p) { if(p== NULL) return 0; else return 1+numI(p->left)+numI(p->right); …

Member Avatar for DoinWork
0
431
Member Avatar for sweetypie95

hey guys, i have a C++ assignment and i have no idea where to start. my assignment is we have to capitalize first letter of the every word entered. if asked user to enter a their full name, the program should capitalize the first letter of their first name, middle …

Member Avatar for mazzica1
0
162
Member Avatar for tyricec

I'm having a problem with my struct I believe. [CODE]struct GLPoint { int x; int y; }; int totalmarbles = 64; GLPoint midhold[64]; double dist(GLPoint a, GLPoint b) { double distance = sqrt(pow(a.x - b.x, 2) + pow(a.y - b.y, 2)); return distance; } void init(void) { glClearColor (1.0, 1.0, …

Member Avatar for Tumlee
0
574
Member Avatar for v_janssens

I am using _getcwd() to get the full path of the current working directory but I am having a strange problem with this: When I run the program from within Visual Studio _getcwd returns "F:\...\ProgramName\bin" to which I append "\Debug\config.txt" to give the path of a text file. However, when …

Member Avatar for Tumlee
0
404
Member Avatar for Kyle Willett

In my cs2 class the assignment is to implement a sparse matrix with pointers without using a 2d array. Here is the exact text: A sparse matrix can be represented using an array of pointers called "arrayOfPointer" and an array of integer called "matrixInfo". The size of "arrayOfPointer" will be …

Member Avatar for Kyle Willett
0
523
Member Avatar for geosparovany2

Hi everyone....iam electronics engineering student and i have experienced some c++ ,i mean i know till oop basics... i want to learn scriptig language for EDA, i want to know which to learn...Perl or Python?....can python do everything perl can do??....i hear that perl is much harder to learn...is it …

Member Avatar for Tumlee
0
228
Member Avatar for ben1996123

I've been getting an error that says a class isn't declared when I try to pass it to a function. I got this error before, so I deleted the code and typed it out again and it worked. It's not working this time. The program starts in main, then goes …

Member Avatar for ben1996123
0
352
Member Avatar for DeusManP0W

char experiment = 'Q' is what I got, however if I were to type in "AAA" or simply more letters than one then it will bug out a bit for me. Is there some kind of similar text to this but for char: [CODE] int mainval; while(true){ cout<<"1. Start game"; …

Member Avatar for DeusManP0W
0
210
Member Avatar for v_janssens

I am trying to call a C++ program for a Windows Forms App and to subsequently wait until the exe finishes. So far here is what I have: [CODE] Dim ProcessID As Integer Dim ProcessHandle As Integer ProcessID = Shell(filepath_exe, AppWinStyle.NormalFocus) ' Check the Shell command worked If ProcessID <> …

Member Avatar for BitBlt
0
288
Member Avatar for kkreisler

I have a hw problem that has me baffled. Im sure It is not a big deal, i just am not that familiar with c++ yet. I am tasked with assigning a char value to rate an employee if I enter certain char's i should display a specified string. and …

Member Avatar for kkreisler
0
148
Member Avatar for MrFlatty

So I'm asked to write a program that outputs the first N number of frugal numbers. A frugal number is a number that has more digits than the digits in its prime factorization (including the number of digits in the powers) Ex: 1024 = 210 1024 is frugal since it …

Member Avatar for gusano79
0
421
Member Avatar for megatron21

I am having hard time understanding what the problem is with my code here. Basically I have a map that contains Key objects as the key, and Block* as the value. The point of this for loop is to print out the values that the key contains on to the …

Member Avatar for megatron21
0
252
Member Avatar for smmcfarl

I am working with an array of 10 numbers and I have already read them in and printed them out. The two functions below are the ones I am having trouble with. This is what the input looks like: 3 7 9 3 8 2 10 11 4 14 Write …

Member Avatar for smmcfarl
0
143
Member Avatar for maybnxtseasn

can anyone please provide me with a clear explanation of Win32 resources? You can make a dialogbox or menu for your win32 program using either resources or using c++ to code it. 1.) Why would i ever choose to use a resource script/editor provided by my compiler vs codeing it …

0
46
Member Avatar for ntrncx

i try to understand how it works. its supposed to work but isnt. the following code shouldnt be working?what i do wrong? i receive the constructor values. [CODE]#include "Person.h" #include <iostream> #include "fstream" #include "cstdlib" using namespace std; int main() { fstream file("malakia.dat", ios::out | ios::in | ios::binary); Person data; …

0
111
Member Avatar for phorce

Hello, I'm developing an application that reads a text file, and then replaces what's in the text file with an array (alphabet) It all works ok until I try and change the position of the inputted character and it returns: [b]Segmentation fault: 11[/b] It's really confusing! Here is my code: …

Member Avatar for sundip
0
97
Member Avatar for DeftArcher

This is the assignment: Write a class named Employee that has the following member variables: name. A string that holds the employee’s name. idNumber. An int variable that holds the employee’s ID number. department. A string that holds the name of the department where the employee works. position. A string …

Member Avatar for Greywolf333
0
1K
Member Avatar for AlecTaylor

Good morning, I've been trying with various libraries (everything from pugixml to RapidXML) but have been unable to parse a simple XML file. [b]I want to grab all the inner text of each page->text into separate std::string's.[/b], so 1 page per std::string. My RapidXML attempt: [url]https://ideone.com/XWylb[/url] My pugiXML attempt: [url]https://ideone.com/RzN6X[/url] …

Member Avatar for AlecTaylor
0
166
Member Avatar for Tylerp14

As the title says, I need to know how to put a "Credits" or "About" tab in my form, so people know that its from me. (I made a little Halo Reach Music Player with music, I just started programming yesterday and the app is finished, it just needs the …

Member Avatar for Tylerp14
0
241
Member Avatar for skylinedrifter

Hello guys... I had an assignment where i needed to find the average temperature.. here is the question This project asks the students to read input data from a file, do some processing, and direct the output onto the screen. Use Visual C++ to write your program. Write a C++ …

Member Avatar for skylinedrifter
0
185
Member Avatar for Frijolero

I cant figure out how to plug in my vectors for my High and Low. I am fairly new please Help. [CODE]#include <iostream> #include <string> #include <vector> #include <iomanip> #include "conio.h" using namespace std; //Create a datatype to represent weather station... struct SurveyInfo { string LocationID; //The location of the …

Member Avatar for vijayan121
0
258
Member Avatar for David321

I have two quick questions: 1) What is the point of a static method? As far as I can tell, there is no data there that would be accessed by multiple objects as there is no data stored there at all... 2)What does it mean to have a const after …

Member Avatar for mike_2000_17
0
158
Member Avatar for mystycs

If statement acting weird. For some reason if in the IF statement `if ( choosePositionX )` goes to else which tells the user the other player already made the move it goes into the next if `if ( choosePositionO )` and prints out the else in that one. How can …

Member Avatar for mystycs
0
124
Member Avatar for tyricec

I'm trying to make it where I can draw an square with the values in the global array. I made it work without vertex array before but now I need to save it in array so I can possibly delete a square with just a mouse click. However I can't …

Member Avatar for tyricec
0
125
Member Avatar for andy8521

Hello I have been trying too long for this but I think I am gonna ask for help. [CODE]#include<iostream> #include<string> #include<math.h> #include "numStack.h" #include"charStack.h" using namespace std; int getNum(int num[],int count); int addition(int n1,int n2); int subtraction(int n1, int n2); int multiplication(int n1,int n2); int division(int n1, int n2); int …

0
64
Member Avatar for Labdabeta

I need to convert a true type font into a list of three dimensional vertices using openGL. I looked at the NeHe tutorial, but it only creates a display list from the font and as far as I can tell it is not possible for me to extract the vertices …

Member Avatar for Labdabeta
0
116

The End.