49,757 Topics

Member Avatar for
Member Avatar for Suzie999

Hi. How can I properly, and explicitly destroy std vector? Here is how it is created. std::vector<std::wstring> vData = StringSplit(sData,L',');// StringSplit returns a vector of wstring Shortly after using and converting the contents of the container, I no longer need it, or want it hanging around in memory. I don't …

Member Avatar for Suzie999
0
316
Member Avatar for mustafaali382

how can i cout diamond shape # in c++,i get many programs form different web but i didnt got it.....plz make it simple and easy

Member Avatar for tinstaafl
-1
129
Member Avatar for vikuseth

I need to list out all the shared folders(directory) in the system along with their path . i want a command or an api in MFC, for listing out the shared directories. please help me in this

0
71
Member Avatar for Suzie999

I'm having a bit of a problem with how to code something. Here is how it is in my head. I want a function which is not part of a class to access members of that class, so I want to make the class global. I have done this with …

Member Avatar for Suzie999
0
424
Member Avatar for Suzie999

Hi Does anyone know if there is an equivilent of std::stoi (string to Int) for use with wstring that I am missing? Seems a bit odd that it would be ommitted from the library, but I cannot find anything. Thank you for reading.

Member Avatar for Suzie999
0
212
Member Avatar for MasterHacker110

I am trying to make an ATM program in C++, I was able to make one 1 C# but decided to try and implemment it int C++. I basicly have this .ini file #constant format: ACCOUNT_NUMBER PIN BALANCE 123 123 123.12 456 456 456.45 And this code: #include <iostream> #include …

Member Avatar for Moschops
0
438
Member Avatar for nmakes

I'm trying to make a function similar to strcat(char,char) in string.h header file. Somehow this code does not catenate the strings. Please help me make it better. void strappend(char *a, char *b) { int i; int start_pos = strlen(a); for (i=0; b[i]!='\0'; i++) { a[start_pos + i] = b[i]; } …

Member Avatar for nmakes
0
193
Member Avatar for CutP

Hey i have no clue what to put in the ReduceFration and CommonDemoninator sections. I know that you call the gcd function for ReduceFration and lcm function for CommonDenominator. Should be easy few lines of code but I'm a Beginner! Here's the code: #include <iostream> using namespace std; int gcd(int …

Member Avatar for deceptikon
0
274
Member Avatar for wilsonz91

Hello, I have a problem using Qt 4.8.4 on VS2012. I manage to compile the code but when I run it, it says: Qt: Could not initialize OLE <error 80010106> on the console but since it has reached the end of the program where it says 'press any key to …

Member Avatar for Terminator1337
0
524
Member Avatar for ncis_sg1

Ok so this is the first time I have ever seen this and it is very confusing. I have an assignment that I need to complete by Sunday night but I am having no luck in this question. Could anyone explain how I am to finish this in a easy …

Member Avatar for mike_2000_17
0
208
Member Avatar for PrimePackster

Hi guys, I have been working on a sudoku solver, that finds solution by brute forcing during my school days.... But due to the huge number of loops i couldn't do it at then.... SO decided to complete it now.... So here the algorithm: 1. Get the number of fixed …

Member Avatar for Gonbe
0
323
Member Avatar for John Linux

Hi, I am looking to write a internet scraper, and have considered the following languages: Python C++ Java The scraper will need to: - Retrieve HTML code from a page - Select a link, name and description from a section of the page - Ask for user confirmation (non gui …

0
76
Member Avatar for chocolatte.lavista

excuse me, can somebody help me to make a simple program that combine an array,function and pointer.. please... i'm already confuse about C++. please... thank you!

Member Avatar for Schol-R-LEA
0
124
Member Avatar for Navlag

So I have this OpenGL program that displays a cube using gluLookAt(0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0); And it allows users to modify/rotate it along the x, y and z axis using input. Right now it looks it works pretty well, however, it terminates once the image …

Member Avatar for myk45
0
270
Member Avatar for wilsonz91

Hi, I wrote a simple windows form in VC12 which works fine. However, I am unable to terminate it properly. Upon clicking either the 'X' (close button) or a button I put in with the code, Application::Exit(); The GUI disappear/closes but the process is actually still running when I check …

Member Avatar for gusano79
0
241
Member Avatar for dan.gerald

I am having problem on removing root, moving the lastnode to the new root and applying the downheap. Here is my code snippet #include <iostream> #include "heap.h" heap::heap() { data=new myvector<heapData> (10); size=0; heapData item; item.key=0; item.data=0; insertItem(item); } heap::~heap() { delete data; }; void heap::insertItem(heapData item) { data->insertAtRank(size,item); size++; …

Member Avatar for buterous
0
494
Member Avatar for poopoowei

TASK 1 Your first task is to create a Makefile for a project. A project has been provided to you in the compressed file CSCI124-Lab3.zip. In this file you will find numerous headers and source files. You can ignore the fact the program is implemented using classes. The program once …

Member Avatar for NathanOliver
0
223
Member Avatar for buug

hello- total c++ n00b here and i'm having problems with an assignment where we're supposed to compare an array of exam answers to an array containg a predetermined answer key and then indicate whether the exam taker has passed or failed. my program compiles just fine, but i'm not getting …

Member Avatar for buug
0
127
Member Avatar for lucas.simon994

Hi, I want to construct a vector tree using the boost make_recursive_variant library. The point of desigin the tree like this is so that when I create a new node, it will be appended to some vector, which acts as a buffer, and then the myStruct_tree will contain pointers to …

0
59
Member Avatar for ChaseRLewis

So I'm writing a memory pool allocator template where it assumes all the objects are of constant size. I need it for a couple objects in a game i'm writing because the dynamic allocation of a large number of small objects is more slow than i'd like. My issue is …

Member Avatar for tinstaafl
0
236
Member Avatar for tristanhall

I'm trying to make a blackjack program for my comp sci class and one thing I can do for extra credit is add a feature that allows a user to play a new game at the end of the first game (and replay games after each game). My thought is …

Member Avatar for tristanhall
0
205
Member Avatar for sadben.khan

Hi, Im having this problem in which the program freezes, the the code in the function called doesn't execute. Help would be much appreciated. // spellchecker2.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include<cmath> #include<iostream> #include<fstream> #include<string> using namespace std; bool inDictionary(string word, string dictionary[]); …

Member Avatar for sadben.khan
0
225
Member Avatar for nick.rechtien.5

Hello all. I am working on a program for class and having a bit of a problem. The program is supposed to ask the user to enter a text file in which read from. Then asks the user for the name of the animal you are searching for. Then if …

Member Avatar for nick.rechtien.5
0
229
Member Avatar for ryl294

START Input TimeEnd,TimeStart If (TimeStart>=1&&TimeEnd<=7) totalPayment=(TimeEnd-TimeStart)*1.20 Else{basicPay=(7-TimeStart)*1.20 overTime=(TimeEnd-7)*1.75 totalPayment=BasicPay+overTime } Output totalPayment END

Member Avatar for Moschops
-2
255
Member Avatar for Johnathon332

hey guys, I am currently having problems with my OpenGL ES 2.0 application. I think I may have done my matrices wrong im not sure, but I cannot see my quad rendered to the screen. I believe it is something to do with the matrices I have set up which …

0
158
Member Avatar for Yiggasay

If my goal is to consider f1 and f2 to hold the numerator and denominator of two fractions and multiply f1(9,8) by f2(2,3). i don't understand how to write the MultipliedBy function if I only have two member variables in the class it's self. I feel like i'm just missing …

Member Avatar for tinstaafl
0
402
Member Avatar for tanmay.majumdar2

Hi people, i was trying this program while understanding the basics of input/output a txt file. SO this is a program while asks the user to input the name of the text file. If it exists, then it will read it else, it will create it and it will prompt …

Member Avatar for vmanes
0
139
Member Avatar for MrTang

Our assignment was to write a tic-tac-toe program for my programming class. It is person vs. computer and the computer makes "random" moves, even if computer is going to lose they will choose a random place to put their x or o it is all correct, now what I have …

Member Avatar for Nayana sharma
0
3K
Member Avatar for Allorango

hey guyz... i have VC++ 2010 project... (DYNAMIC LINK LIBRARY) and i have to use that dll (which is made byy c++) in VB 6 as reference... when i am using it... giving me this msg... 'Can't Add a Referenve to specified file' how to solve this...??? please help me...

Member Avatar for Allorango
0
148
Member Avatar for mksakeesh

why does code 1 gives segfault error whereas code 2 doesn't, both are basically same, do anyone have any suggestion? 1. #include <iostream> using namespace std; template <class T> class nodes { template <class U> friend class linklistchain; private: nodes<T> *adrs; T data; }; template <class T> class linklistchain { …

Member Avatar for mksakeesh
0
271

The End.