Beginners - December 2014 (Page 24)

HELP QUICK
 
Could someone explain to me what is going on?? #include <iostream> 2. using namespace std; 3. 4. 5. void magic(int &X, int Y) 6. { 7. int temp = Y; 8. Y =...
[5 replies] Last: void voodoo(int* X, int* &Y) //X=px, so X->x Y is a synonym for py. ... (by dhayden)
Display highest number
 
I am new to programming and im stuck on a part of my program where i have to display the highest number out of 5 numbers. cout << "Enter num 1" << endl; ci...
[6 replies] Last: // DisplayHighestNumber.cpp #include <iostream> using namespace st... (by patriic48)
task
 
easy task : input : limit number until it will write these numbers. output = 1 2 3 5 8 13 21
[1 reply] : Looks like a Fibonacci sequence with the first "1" missing. What task... (by cnoeval)
How do I use regular expressions with Standard Template Library in C++?
 
I am trying to learn regular expressions in C++. I need to have it so that the user can only enter in the integers between 1 & 15. Can someone show me an exampl...
[1 reply] : #include <regex> #include <iostream> #include <string> int main() { ... (by MiiNiPaa)
Where in my code should I put function to constantly move a square (OpenGl, Glut, looping)
 
Greetings fellow programmers. I am making a game using opengl and glut. The game consists of a blue square (which you control) getting chased by a red square (t...
[no replies]
help with classes.
 
I'm not sure what I am doing wrong, I keep getting error syntax with the "{" in "{ return current_speed; }" , but I get more errors if I take it off. Instru...
[6 replies] Last: The code is working i'm just trying to figure out why my acceleration ... (by karlos675)
selection sort error
 
I seem to be having a small error and I can't figure out for the life of me the issue. "in function " void selectionsortArray (int*, int):" "error expe...
[1 reply] : use code tags <> (by anup30)
Blackjack (21) Programming Code
 
Hi guys, So I am new to programming and I have to make a Blackjack (21) programming code. I am in a programming class and this was homework assignment haha...
[1 reply] : Basicly you need to know rank of card first. Then for cards that is no... (by MiiNiPaa)
formatting mysql timestamp yyyymmddhhmmss
 
I am trying to write a timestamp function compatible with a MySQL database TIMESTAMP type. This is what I have so far. I think it will work except for one prob...
[1 reply] : #include <iostream> #include <ctime> #include <string> std::string n... (by JLBorges)
system("PAUSE")
 
I need to use system pause but codeblocks says that "system" was not declared. is there a way around this? i'd like to still use system pause if possible thanks...
[2 replies] Last: I completely forgot about that library thanks! (by suzaku343)
No suitable conversion function from "Time" to "int" exists
 
I'm working on a program using a lab I did a few weeks ago. I need to write the following operator overload functions then include a pre-written file (Optimecli...
[1 reply] : Time Time::operator-(Time & Robj); Your operator- returns Time obj... (by MiiNiPaa)
Output Question Doubt ??
 
The output of the following program is 5,3,4,4 Should it not be 5,3,5,3?? #include<iostream.h> void main() { int x=5,y=5; cout<<x--; cout<...
[5 replies] Last: This has nothing to do with precedence. (by Peter87)
Fastest algorithm can find shortest pass in graph, where edges are equals weight ?
 
Hi, I search the fastest algorithm can find shortest pass, in oriented graph, where edge are equals weight. I know some algo : Dijkstra, Belman-Ford, Floy...
[1 reply] : Use Breadth first search, simply iterate until you reach your goal nod... (by Smac89)
Changing a string input to capital letters
 
I've got the single character input to change to caps but can't get it to change when the user inputs a word guess void compareguess(string& aster, string ge...
[1 reply] : How about this: for (unsigned short i=0; i <= getword.length () - 1... (by ebucna)
by GaryDT
Instantiating Objects On The Heap
 
With reference to Method 1 and Method 2 in main() my question is below: Question: how does 1) instantiating an object on the heap, and then afterwards ...
[6 replies] Last: Cool. Thanks again. (by GaryDT)
Variables and Types
 
Hello, everyone! I am brand new to C++ (or any kind of programming related subject for that matter) and I created the "Hello World" program without any dif...
[1 reply] : An identifier is a name. When talking about variables, valid identif... (by Peter87)
Reading file
 
What i actually want to do is get the program to read the file. from there i want the user to enter first "or" last name and then the program actually outputs t...
[no replies]
Multiplication Table With While Loop
 
I have created Multiplication Table using while loop. Now I am trying to make multiplication table that show input only when a an "odd" number is entered. Can s...
[3 replies] Last: @nerdpwn, thanks for your help. I will not forget this now. :) BTW I d... (by SobanSA)
Why is my output giving garbage values?
 
Why does my output come out with all the garbage values at the end? My code shows my class, part of the main body, and the function that i know has an issue bu...
[6 replies] Last: @TheIdeasMan thanks for ur advice but as to your questions, all of th... (by TheIdeasMan)
weird "empty" character
 
My terminal prints the words read from a document and stores it in binary search tree object called document1, and their corresponding lines numbers in the docu...
[1 reply] : I'd like to see your code. BTW, I dig your handle! (by koothkeeper)
December 2014 Pages: 1... 2223242526... 55
  Archived months: [nov2014] [jan2015]

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