General C++ Programming - November 2014 (Page 29)

List of functions that can create a Unique ID
 
I'm working on a list of functions that can help create a unique ID for a computer Here's what i have so far: GetAdapterInfo(); RegOpenKeyEx(); GetVolumeI...
[1 reply] : UuidCreate(): http://msdn.microsoft.com/en-us/library/windows/desktop... (by coder777)
Replace some elements in text file.
 
Hi everyone! I have a text file, like that: (A1* * * *A1) * (AM-MNR*AM-MNR) (V*V) (C-A1* * * * C-A1) Now, I would like to replace some elements, f...
[1 reply] : hmm..you can try posting what you've got so far(just the fil. But I gu... (by rjvc)
by Myna
Need ASAP help with array in C++
 
I need to write a lottery program that generate 5 non duplicate number between 1-20. Below is my code and it said my is undefined and it is an undeclare ident...
[1 reply] : for (int i = 0; i < 5; i++); try getting rid of this semi-colon..... (by rjvc)
by toast9
binary search tree dfs
 
I'm doing a depth first search on a binary tree. My function always returns false no matter what I do. I step through the code with break points and it does fin...
[2 replies] Last: It does make sense, thank you! (by toast9)
by jaymez
Reading ints from a Text File with a 2D Array
 
reading in a maze into a 2D array. The first two reads will give me the dimension of the maze(ex. m x n maze). So in order to create the 2D array i need the fir...
[3 replies] Last: @jaymez So im guessing because i didn't zero it out it couldn't acce... (by whitenite1)
Nested for loop assistance?
 
Having trouble creating a nested for loop for three and two dimensional arrays. Am I getting it wrong at some point in my program? I'm not entirely sure on how...
[no replies]
Big-O help
 
I was wondering if someone could help me out finding the Big-O of these two functions: This function I'm guessing is O(1) but I'm thinking that's wrong. in...
[3 replies] Last: int sum(int A , int i, int n) { if (n == 1) return A ; retur... (by htirwin)
2D vector problem
 
cout<<"How many points are there?\n"; int number; cin>>number; vector<vector<node*> >points(number,vector<node*>(0)); for(int i=0;i<number;i++) //labe...
[3 replies] Last: Well actually you'd need to do points .push_back(newNode); Also that... (by Ganado)
by Java90
File .txt with structs
 
Hello!! I want to know how can I get the information of each contact, I add a contact and save in a file.txt but I don't know how to get the information of con...
[no replies]
by slovit
matrix
 
my program crashes upon opening but ill need more help after as im am very lost #include<iostream> using namespace std; int main() { int matrix ; ...
[2 replies] Last: In the statement cout << matrix ; What is the value of i and j? ... (by Ispil)
Reverse a string
 
Explain this program to reverse an input string: #include<stdio.h> #include<conio.h> #include<string.h> void main() { void reverse(void); clrscr(); ...
[2 replies] Last: I've got just a bit idea about them but still cant understand the prog... (by sudarshanpraz)
help with array code
 
Ok so i am new to c++, Please help with the following code. OK SO THIS ARE THE INSTRUCTIONS I NEED TO FOLLOW FOR A SPECIFIC PART OF THE PROGRAM WHICH IS TO ...
[no replies]
Selecting the design pattern
 
Hi All, Is it possible to encapsulate the state machine using design pattern. State machine might change depending on the object type. Thanks in advance
[2 replies] Last: http://sourcemaking.com/design_patterns/state (by JLBorges)
Trouble with my getFunctions in header
 
I'm working on assignment dealing with a class file. the constructor creates a dynamically allocated array of users choice of size. where i have set member func...
[4 replies] Last: Sometimes I just talk myself out of things i already knew haha. Thanks... (by Holloway22)
Error: expected delcaration before '}' token (No bracket error)
 
There is only one set of brackets, so I know that I did not mess up the brackets. #include <iostream> #include <string.h> #include <string> using namespace...
[2 replies] Last: Thanks a ton. <3 (by Twenper10flat)
Why is my string outputting twice?
 
Hey guys! I'm working an an assignment for C++, and I've almost got it figured out--except for one little glitch. When I run the program, the prompt I am gi...
[6 replies] Last: Perfect, thanks so much! (by sirlukepotter)
priority queue
 
I know queue but with priority queue i am really amateur. can you help me implement some functions in priority queue. thanks in advance! template <clas...
[8 replies] Last: In the heapsort function (on the wiki page) there is a value called e... (by doug4)
by Masada
Copy and Overloading constructors
 
I figured this is the best place for this type of issue. I don't understand how to implement these functions into my program. I have everything else working the...
[1 reply] : That's right! CandidateList(const CandidateList& other); ... (by LazaroBinda)
Casino Betting Game
 
I am trying to create a casino game using functions that allows the user to play any of 4 games as many times as they want. The first game is High-Low where ...
[no replies]
[urgent]Priority Queue
 
I implement copy constructor for priority queue like this, is it right? PRIORITY_QUEUE<T>::PRIORITY_QUEUE(const PRIORITY_QUEUE &aQueue) { this->maxSize...
[2 replies] Last: thnks, anyone help "insert" and "heapify" (by nightmaregiba)
November 2014 Pages: 1... 272829303132
  Archived months: [oct2014] [dec2014]

This is an archived page. To post a new message, go to the current page.