General C++ Programming - January 2013 (Page 17)

School Project (cannot reach instructor)
 
PLEASE PLEASE PLEASE do not simply give me the answer. I am posting to this forum because my teacher is unreachable at the moment, and I have an assignment due...
[1 reply] : When you have "getters" (ie. functions that only retrieve values from ... (by cire)
VGA Graphics modes and the attribute controller?
 
Does the VGA use the attribute controller for DAC translation during graphics modes (I'm working based on the VGA registers)? If so, when etc.?
[no replies]
I need help using rand / <ctime>
 
I'm creating a basic minesweeping
[1 reply] : #include <iostream> #include <cstdlib> #include <ctime> int main() {... (by JLBorges)
by Yamraj
Need help with Solitaire code
 
Hi guys, I have been given the task to comment a code for solitaire which is broken into 3-4 header files. I will post each one seperately, and as I learn what ...
[1 reply] : Card (std::string, std::string); // Creates the card given the suit a... (by Stewbond)
Cooperative Multitasking system
 
Hi there I'm trying to get around the concept of cooperative multitasking system and exactly how it works in a single threaded application. My understandi...
[2 replies] Last: > My understanding is that this is a "form of multitasking in which mu... (by JLBorges)
redefinition of formal parameter
 
void Quicksort(int info ,int left,int right){ int left; int right; int pivot = left + (right - left)/2;//it is the middle (will change sometimes but will en...
[4 replies] Last: yes it means im defining them again sorry silly mistake (by faieq92)
Re-inserting into std::priority_queue
 
I sometimes need to change the place of the element in the priority_queue. I did it like this: #include <queue> #include <algorithm> struct Vector2i { un...
[2 replies] Last: this->c is std::vector which is used by std::priority queue. Works on ... (by closed account 10oTURfi)
How is this working
 
how is this working without any if/else statement void Time::setSecond( int s ) { second = ( s >= 0 && s < 60 ) ? s : 0; // validate second } ...
[1 reply] : The ?: operator is a conditional one. It is ternary, and reads as... ... (by jaded7)
Multidimensional Character Arrays Help!!!
 
I'm trying to create Minesweeper and I need help with 2D Multidimensional character Arrays, It doesnt appear like in a grid format i want it to. #include<ios...
[1 reply] : Hi, firstly, you have syntax errors on the following lines.... {'?... (by jaded7)
Function argument with nested argument
 
Hi, I am trying to build a function with an array object as argument. Please see the following code: // main.cpp const int a = 10; ...... //fu...
[9 replies] Last: OK thanks guestgulkan, that is very clear! (by dekeenfrance)
Reading file from .txt file to a srting variable !!!
 
hey people can someone please tell me how to read a .txt file and put it into a string file ?? Please Help me this somewhat i tried to check It isn't wo...
[no replies]
problem with files
 
how i can search a sub string in a file? length of sub string is Variable and the number of search is indefinite.
[15 replies] Last: Thanks a lot. (by amirmsc)
Encryption/Decription.
 
Hi guys, i'm supposed to complete an assignment to get the following : btw, IET = initial encrypted text while FET is final encrypted text. Appreciate your help...
[no replies]
Multi-tasking
 
I was trying to make a program in which i want some set of statements to execute throughout my program like a different section and to execute main program in n...
[no replies]
Trouble with pointer to member function
 
Ok so I am working on a game and I'm in the process of developing my Player class. Anyways, what I have is a keyboard function that is called in my main functi...
[2 replies] Last: The thing is that member functions have an implicit parameter ( this ... (by KRAkatau)
How to create a global object
 
if (choice ==1){ Light *myobj = new Light(); } FlipUpCommand switchUp(*myobj); Error: `myobj' undeclared (first use this function) Please advice h...
[4 replies] Last: Sorry for my inattention. coder777 is right, of course, no second poin... (by r4zzz4k)
by BandK
Example problem...
 
This is part of some code. I do not know how to explain this part of code. Please help :( int k = 0, l=n-1, m=k; while(k<l){ while(*(a+k)<=*(a+m)) k++...
[3 replies] Last: what this line of code mean -> while(*(a+k)<=*(a+m)) is it variable "... (by BandK)
by efe909
mutex
 
Hi, I am learning multi-threaded programming (C++) using POSIX libraries. I have been using the mutex's perfectly well yet I want to clarify something. In almo...
[2 replies] Last: I definitely agree that it is bad programming not to check a lock befo... (by efe909)
decreaseKey in STL Priority Queue
 
I'm trying to implement Prim's Algorithm and for that I need to have a decreaseKey method for a priority queue (to update the key value in a priority queue). Ca...
[1 reply] : Instead of a std::priority_queue<> , use a std::set<> with an appro... (by JLBorges)
Books for beginner...ish.
 
Hey guys, i know this has been asked before but, i have not found anything about getting a book for a person like myself. I know the basics in a way of c++. I k...
[1 reply] : See http://stackoverflow.com/questions/388242/the-definitive-c-book-gu... (by JLBorges)
January 2013 Pages: 1... 1516171819... 36
  Archived months: [dec2012] [feb2013]

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