Beginners - November 2010 (Page 23)

Im having an issue with a class project
 
#include <iostream> #include <string> #include <iomanip> using namespace std; int main () { string diverName = " ", diverCity = " "; int highestScor...
[1 reply] : You don't add {} to your if statements. For example, if (score < 0 ||... (by hamsterman)
add 2D array values
 
hi everyone! i have a problem with 2D array and tried this for 2 days. array is m*n and want to add values. explained in following example. 1 2 3 4 5 ...
[1 reply] : Very nice. (by Disch)
by qjwzyy
strange error
 
struct net{ char PIPIN ; char POPIN ; }n ; //change PIPIN and POPIN value here. cout<<n .PIPIN<<", "<<sizeof(n .PIPIN); // The result is: 2424...
[1 reply] : n .PIPIN is a char array. When you cout a char array it's like prin... (by Disch)
heelp with homework
 
/* not copyrighted in any way shape or form. made purely for the joy of calculating. -jg16477 */ #include <math.h> #include <iostream> #include <s...
[5 replies] Last: Oh.... 'kay then.... http://cplusplus.com/articles/how_to_ask/ -Al... (by Albatross)
Decimal to Hexadecimal
 
I'm not too sure how well I did when I wrote this function. It does work just fine, but I'm worried that there might be a better way of doing this (in fact, I'm...
[2 replies] Last: Thank you. I've been meaning to study other forms of streams besides f... (by zeroslash)
Destructor called early
 
I have a class which is initialized, then calls its destructor straight away for some reason. SaveDataWrapper is the class, it is a global variable. SaveDat...
[4 replies] Last: I do delete all my objects when I'm done with them. This isn't assigne... (by soupsoup)
by Fedot
IfStream,Ofstream
 
Thank you cause u helpd me whit previous problem but im stuck again. I saw i can retrive number whit ifstream but i dont know how to check if its same like i...
[4 replies] Last: ok now i change myfile.open ("nr.txt",ios::app ); but how i can... (by Fedot)
Keeping track of exits.
 
Ok, so I made a program that has a log in and password, blah blah. I know how to make it write to files, so if someone logs in, it will enter a date, and save i...
[no replies]
Custom Error Message
 
I am trying to have my error message read "Uninitialized variable NameOfVariable", how can I add the variable (such as x or y...underlined in the code below) to...
[no replies]
Animated backtracking
 
Hi! I have recently learned the backtracking method, and I want to make an animation showing how it works. Nothing fancy, just a n x n grid, a ball and a hole....
[1 reply] : You could look up SFML, which in my opinion is pretty simple once you ... (by Zhuge)
by Fedot
Unique Random Numbers!
 
I need some help! i create a program to give me 20 numbers from 1-90 interval but i want to implement more things. #include "stdafx.h" #include <cstdlib>...
[3 replies] Last: Solved whit time delay thank you! (by Fedot)
Wumpus Hunt 3
 
I have made revisions to my program. I gave up on the idea of using functions that return arrays. That was far too complicated for the expected benefit. This ...
[no replies]
by sk1tz0
reading in char in int
 
forget it
[1 reply] : Now what does this mean? (by firix)
by firix
pow function
 
Hi, What makes the pow function?I could not understand. Can you briefly explain?
[12 replies] Last: I understand very well.thanks (by firix)
Two dimensional array
 
I have a simple C program as below : int matrix = { {11,12,13}, {21,22,23}, {31,32,33} }; int main() { printf("Element [1,2] is %d ...
[2 replies] Last: int matrix = { {11,12,13}, {21,22,23}, {31,32,33} }; int mai... (by eraggo)
Question of regular expression
 
Below is my code string str2 = "1, 2, 3, 4, 5, 6, 7, 8"; string output; typedef std::tr1::sregex_token_iterator sti; const sti end; for(sti i(str2...
[2 replies] Last: Now I have another question string s = "point(1,1,:)=[303 225 1]... (by stereoMatching)
hello how can i get the ascii value from a char
 
i mean i need to enter a single char and to print his ascii value and i have no idea of how doing so in C++. its a problem that i got from a pascal book, a...
[1 reply] : Characters are stored as ascii values, to display it you need to cast ... (by Bazzy)
by firix
class Imaginary to represent imaginary numbers
 
Hi friends, Define a class Imaginary to represent imaginary numbers. Define class Complex based on that.Implement the fundamental arithmetic operators. Th...
[no replies]
Array element
 
I have a C program like this : int main() { int a ={1,2,3,4,5}; printf("%d %d \n",a,(&a+1)); return 0; } Output: Address of 1st element of array a ,Ad...
[no replies]
by firix
C/C++ Certification
 
hello friends, c / c + + Do you have a chance in the certification.specific tests that can be entered.for the system, such as the certificates of microsoft....
[7 replies] Last: Do you have microsoft exams ? (by firix)
November 2010 Pages: 1... 2122232425... 42
  Archived months: [oct2010] [dec2010]

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