49,757 Topics

Member Avatar for
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
402
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
350
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
285
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
141
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
183
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
115
Member Avatar for jdh1231

Right now, I am learning how to use an Array. How the program should work is, I declare how many numbers I want to input, and then, put numbers in. At last, I can choose either find the maximum, sum, or product. The program seems right to me but it's …

Member Avatar for jdh1231
0
345
Member Avatar for jenbrandau341

Here is my project: Write a program that dynamically allocates an array large enough to hold a user defined number of structures (string name and three double tests). Using a function, the user will enter a name and 3 test scores for each element in the array. Using another function, …

Member Avatar for WaltP
0
229
Member Avatar for dragon_chick

Ok, so for this assignment, we were given a program and a class. We have to find where the program code needs modified and make the changes necessary to use the class. [CODE]/****************************************************************************** Programmer: Date: November 6, 2011 Compiler: Cisual C++.NET Source File: hw7.cpp Action: Reads words from stdin and …

Member Avatar for Moschops
0
300
Member Avatar for valestrom

Hi, I'm trying to make a set of monsters that have values that can be loaded. Like a Goblin having enemyhealth = 50, enemydamage = 15, etc. Here's what I kinda have an idea of doing... But I really have no idea how to use it. (File containing values for …

Member Avatar for valestrom
0
292
Member Avatar for Amir798

hey everyone.. i am a newbie to c++.. please someone tell me that how can i move different objects like circles, rectangles over the screen by using keyboard keys in Graphics mode?

0
49

The End.