49,761 Topics
| |
I am kinda bord and dont know what to write. I have lerned the basics of strings, references, pointers, file I/O, classes, enums (simple error functions). Also some basic exceptions. And ofcourse all the other basics of chars, ints... So what are some cool "mini" project that i couldd work … | |
I am getting an error when i try to compile this code int StartProgram(string sProgramName){ ShellExecute(NULL, NULL, sProgramName, NULL, NULL, SW_SHOW); } | |
I am trying to write a basic link list, so that I can understand how to implement it in C++. The tutorial I read was extremely advanced (giving more code than needed to understand and not explaining really how). So i tried to write this simple linked list: #include <iostream> … | |
For my Optics course, we need to write a program that will take a certain input, perform a matrix computation, and output a system matrix. The program also needs to check for nonsense input and be able to "be adjusted" for any amount of matrix elements. I took a course … | |
Hi, I have to open and read multiple files which are in same folders. I can search and collect the whole size of those files. But the problem is with when I'm copying the files to a buffer. How can I read the multiple files? I'm using this example for … | |
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 … | |
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 | |
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 | |
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 … | |
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. | |
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 … | |
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]; } … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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! | |
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 … | |
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 … | |
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++; … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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[]); … | |
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 … | |
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 | |
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 … |
The End.