49,761 Topics

Member Avatar for
Member Avatar for LevyDee

This is my basic set up as of right now for how my server will handle new connections to a listening socket. I created a simple console app to mimic a connecting client so I can do some testing. All works fine, and I can connect, but I debugged my …

0
46
Member Avatar for patrickmh

I'm fourteen trying this on my own for the first time. Yes it is for my junior high math class. I am having a few issues.. I have cleared many of my issues up after I found I had left out a lot of {{ type things.. Any help would …

Member Avatar for pseudorandom21
0
156
Member Avatar for MykMallett

I am asking on multiple forums because I am desperate! Hi, firstly I would just like to say that I am not a C++ programmer and I never intend to be - I am an SQL, javascript and PHP developer. For a module at University I have to alter a …

Member Avatar for Moschops
0
247
Member Avatar for Xytheron

Hey all! Homework help again...except this time not in the way you think lol...I finished all my problems and realized there's a problem in my makefile which I need in order to submit Here's the original make file that our professor gave us [CODE] CC = gcc JVC = javac …

Member Avatar for gerard4143
0
198
Member Avatar for blee93

This problem was from the book C++ Primer Plus Chapter 4 #8. The point of the code is to create a structure and use the new keyword to dynamically create a new structure. This problem makes me alter my code for the previous problem in the book so that I …

Member Avatar for blee93
0
120
Member Avatar for caltech

[CODE] #include <iostream> #include <cmath> #include <iomanip> using namespace std; int main () { int numb, sum, divis3, divis5; numb = 20; sum = 0; double value = sqrt(numb); cout.setf(ios::fixed,ios::floatfield); cout << setw(8) << left << "NUMBER" << setw(8) << left << "DIVIS3" << setw(8) << left << "DIVIS5" << …

Member Avatar for rxlim
0
131
Member Avatar for eduard77

i have the next code that compiles without problems but when I run it after I put in the input data it gives me the next error: line 128 vector iterator not decrementable I use visual c++ 2010. [CODE] #include <iostream> #include <iomanip> #include <vector> #include <iterator> #include <algorithm> #include …

Member Avatar for mike_2000_17
0
439
Member Avatar for punter

The basic structure of the program is this: 1. issue an interactive prompt for the user to enter a non-negative number, 2. verify that the input is indeed non-negative, or that the user wishes to end the program, 3. calculate the square root of the input value, using the method …

Member Avatar for SaadBinSaulat
0
189
Member Avatar for DGeneral

Hello, I took a C++ code from a colleague which uses OpenCV for image processing, and when I try to debug the program using Visual Studio 2008, as soon as the black output window pops up, I get the following error (Windows error, not code error): [B]"The program can't start …

Member Avatar for pseudorandom21
0
263
Member Avatar for winecoding

With respect to the following code segment, what should be the n value in different classes, e.g., what is a.n, b[2].n, and c->n How to analyze them? [CODE]#include <iostream> using namespace std; class CDummy { public: static int n; CDummy(){ n++ ;}; ~CDummy(){ n--; }; }; int CDummy::n = 0; …

Member Avatar for pseudorandom21
0
100
Member Avatar for akase2010

The Assignment is: Write a class named Car that has the following member variables: yearModel, make, speed. In addition the class should have the following constructor and the other member functions constructor-accept the cars year model make as arguments. an assign to the objects year, make also assign speed 0 …

Member Avatar for rxlim
0
200
Member Avatar for eduard77

The output of the vector that you helped me make is a little hard to read. Can you help me make it a little more readable like: Input: Enter number of different sizes: 5 and the inputs are : 35 x 2.36 23 x 1.23 12 x 4.23 16 x …

Member Avatar for eduard77
0
90
Member Avatar for plang007

Here is my code: [CODE]#include <iostream> #include <fstream> #include <iomanip> #include <cmath> #include <time.h> #include <assert.h> using namespace std; int main() { // = (num3&&num4) - (num1&&num2); // save this calc for later: hrIn + (hrOut/60.0); // same thing = num3 + (num4/60); // write an alogorithm to establish the …

Member Avatar for rxlim
0
163
Member Avatar for XA04

I'm trying to create an array of my object I made, and basically the object doesn't have a default constructor, only a self made one. I've made my object array in the header file e.g. Object myObject[4];, however doing it this way requires for me to have a default constructor, …

Member Avatar for rxlim
0
699
Member Avatar for bleedsgreen33

My professor has working with very large number. We bring them into our project through a file stream (.txt). I get the MATH behind using 3 arrays to add, subtract, and store the sum of the numbers. I get that you can do a "x-'0'" to convert the char to …

Member Avatar for bleedsgreen33
0
172
Member Avatar for sing1006

well,this is my college assignment question.the question ask us to write a program that can compare 3 number,who is the biggest and smaller.the output should be like this: Enter 3 numbers. Number1: Number2: Number3: Main Menu 1)Find the biggest value among the 3 value you have enter juz now. 2)Find …

Member Avatar for ravenous
0
380
Member Avatar for Nandomo

I don't know how to get the program to display properly any tips? Also would anyone guide me on how the logic works for deallocating all this memory please. [CODE]#include <iostream> #include <cstdlib> #include <windows.h> using namespace std; struct Entry { char name[23]; int age; Entry *next; }; // Prototype …

Member Avatar for rxlim
0
104
Member Avatar for Howdydoody

1) Write a function that merges two instances of the List ADT using the following specifications: MergeList (List list1, List list2, List& result) • list1 and list2 have been initialized and are sorted using function ComparedTo • result is a sorted list that contains all of the items a. Write …

Member Avatar for ravenous
0
647
Member Avatar for realproskater

So all i have to do is clean it up but cant find the source to the actual error. Heres my code: [code] #include <iostream> #include <fstream> #include <string> using namespace std; bool isVowel(char ch); string rotate(string pStr); string pigLatinString(string pStr); int main() { ifstream infile; string newstr; int length; …

Member Avatar for djarn
0
170
Member Avatar for alex55

i have this function that should compare values and return a string based on input from the main function. However it returns no value at all does anyone see and issue with it? have checked all the input it is getting the correct values highestMontName and averagedMonth are declared globally …

Member Avatar for alex55
0
123
Member Avatar for ronthedon

How do i get the loop to go back and prompt using for a valid number? #include<iostream> #include<conio.h> #include<iomanip> #include<string> using namespace std; int main () { string firstName; string lastName; int score1, score2, score3, score4, score5; float totalpoints; cout<<fixed<<showpoint<<setprecision(2); cout<<"Please enter the student first and last name: "; cin>>firstName>>lastName; …

Member Avatar for ntrncx
0
134
Member Avatar for JeremyK2

I have a class that stores all of my variables and functions (for our purposes, DataClass), and a few different windows form classes that use the public variables and functions in DataClass. I need to keep the values of the public variables in DataClass until the program closes. I set …

Member Avatar for rxlim
0
205
Member Avatar for Mr. K

What is wrong with my code? My fps time is not working.I found two errors in my code. Error 1 error C3861: 'install_timer_ex': identifier not found. Error 2 error C3861: 'textmode': identifier not found. [CODE]#include <allegro.h> BITMAP* buffer = create_bitmap(480,480); volatile int fps = 0; volatile int avg_fps = 0; …

Member Avatar for rxlim
0
207
Member Avatar for hust921

Source: [CODE] #include<Windows.h> #include<conio.h> int main() { char stop = static_cast<char>(getch()); while (stop != 's') { // 'S' needs to be WIN+S keybd_event(VK_LWIN, 0x5b, 0, 0); // Press WIN KEY keybd_event(VK_LEFT, '0x25', 0, 0); // Press LEFT KEY keybd_event(VK_LEFT, '0x25', KEYEVENTF_KEYUP, 0); // Lift LEFT KEY } keybd_event(VK_LEFT, '0x25', KEYEVENTF_KEYUP, …

Member Avatar for rxlim
0
75
Member Avatar for elsiekins

Hello, I have a program that uses getchar() and slightly confused and tried googling and it made it worse [ICODE] cout << ">What is the expected letter <<"\n>"; expectedLetter = getchar(); putchar(expectedLetterl); string exletter = expectedleter + post; cout <<">Do you wish to enter another letter (Y/y)/(N/n)\n>"; repeatIn = getchar(); …

Member Avatar for elsiekins
0
160
Member Avatar for AnGeL_69

im wondering if any1 can send me the function that evaluates the value of a postfix expression in c++<<using stacks>>... i really need it as soon as possible.. :sad:

Member Avatar for khanmj89
0
247
Member Avatar for jaymo'o

hi everybody. Im very well a beginner and I cant quiet grasp classes. I found that this topic is all over forums and I have decided to give it a whirl and I am stuck. Would anybody out there help?

Member Avatar for rxlim
0
146
Member Avatar for hveed

hi all, I am trying to create a pointer to a member of a struct and then do a boolean comparison to see if there is currently anything in that member. here is what I have so far: card* openPtr = opencells; char* rankPtr; rankPtr = (*openPtr).rank; cout<<" Free Cells …

Member Avatar for rxlim
0
105
Member Avatar for arthurav

The subject of my bachelour thesis is "Solving linear programming problems using parallel algorithms". I will create a library for solving different kinds of problems (simplex, branch and bound and so on). I want to use OpenMP or PThreads locally and OpenMPI in the network. Which one would you recommend …

Member Avatar for arthurav
0
127
Member Avatar for crapgarden

Just to clarify, the text I'm reading defines the lifecycle of a program as: -idea -plan -source code -object file -executable. In gaming terms would this be comparable to: -an Italian plumber goes on an adventure to save a princess from evil turtles and mushrooms. -sketch out level designs. Write …

Member Avatar for jonsca
1
182

The End.