Beginners - October 2009 (Page 17)

Two switch statements, skipping the second one.
 
I have two switch statements in my program. If a user enters a 10 through 19 and the program enters the "Case 1" in the first switch statement, how can I progra...
[4 replies] Last: That explains that, thanks much! (by foncused)
Using namespace std
 
I have Borland Turbo c++ version 3.0 installed on my computer. When i compiled foll. program: #include <iostream> using namespace std; int main () { ...
[1 reply] : Turbo C++ 3.0 is really old, I suggest you update it or get something ... (by firedraco)
by JRevor
Passing a vector's pointer to a function
 
I have a certain function. Its prototype is void whatever(const int* p, const unsigned& length) I want to pass as the first parameter the pointer to t...
[2 replies] Last: thanks (by JRevor)
how to copy integer into string
 
i need to copy int idno into char idno2 so i can use it for my graphics.h command outtextxy(x1,x2,y1,y2,idno ) because it only takes on character da...
[2 replies] Last: it worked! haha! thanks :D ure a life saver :)) (by icko718)
Yet another "Press ENTER to continue"
 
void gamePlayBattle(user &x) { cout << x.avatar.name << " has entered gamePlayBattle(you)\n"; x.avatar.hp = x.avatar.level; cout << "Creating enemy..." ...
[3 replies] Last: cin.clear(); // Ignore any errors cin.ignore( numeric_limits <st... (by Archaea)
by JRevor
Weird compiler error.
 
I have two classes, Monomio (which represents a monom.. with its coefficient,and exponent) and Polinomio, which has a dynamic array of Monoms. In Polinomio, ...
[4 replies] Last: Thanks Bazzy, that solved the problem. To tell the truth, the error ... (by JRevor)
How to insert data to textfile with spaces
 
Hello guys, Now i am trying to insert a data to my text file but my problem is how to include the spacebars. My program will ask me what is the nam...
[14 replies] Last: A few definitions: GCC: the GNU Compiler Collection (previously, the ... (by helios)
Need your opinion about basic commands (code)
 
Can anyone help me about how could i write a short code whitch calculating the POSITION of two points in a plane and the TILT of the line of those two points ...
[1 reply] : I don't understand the first part about calculating the position of tw... (by jsmith)
by liza12
password as **** but password will be = "liza"
 
uhm.... excuse me but can you please help me? i'm having trouble with making password in TURBO c.... the condition goes like this, while the user is entering a ...
[8 replies] Last: do i nid to print this>>>(\b') we are using TURBO C...almost of the co... (by liza12)
questions regarding ignore and clear
 
hi my question is same as title eg: cout << "enter an integer: "; cin >> integer; cin.ignore(); how does cin.ignore() worked?? and how does c...
[4 replies] Last: ok ok thanks now i understand what ignore and clear means thanks gu... (by loveless)
Array
 
My aim is to allow the user to input positive integers, which will be stored in an array with just enough memory, so each time a new number is entered, the arra...
[3 replies] Last: Arrays don't work that way; they have constant size. That is, onc... (by Duthomhas)
problem using string in class member function
 
Hi guys, my code is giving me the following error : " 'std::string' : illegal use of this type as an expression" Could someone tell me what is wrong ive comm...
[3 replies] Last: Ah,seems that you still don't know how to call a function...Read more ... (by hxslacker)
String and Char*
 
I'm just wondering.. how are the uses between a string and a char* (a pointer to a character?) different?
[3 replies] Last: @PanGalactic ... Thank you! (by mcleano)
Calling a php script on a website
 
Hi, there is a certain php script I need to call from my program and I was wondering how to do that with C++? I don't need to open a browser, simply call the sc...
[no replies]
Multi-dimensional array error
 
I'm having an error when working with a multi-dimensional array for my Tic Tac Toe game. The problem is in the constructor and the destructor of the class, b...
[6 replies] Last: kevinchkin, how come I get the feeling you're right? :\ Thanks ever... (by bluezor)
How to store Ascii character set in an array using pointers
 
I'm trying to get a grasp on how to manage pointers effectively, and am trying to do a simple program that will store all the ascii characters into an array usi...
[2 replies] Last: A couple things: 1. A char is an integer, there's nothing magical abo... (by helios)
Printing gdb output using C/C++ function
 
Hi Guys, Is there a way that we can print gdb output on segmentation fault from C program? I mean, we just have to catch SIGSEGV and call the function wit...
[4 replies] Last: Thanks for the reply Jsmith. I will look into this. (by kevinchkin)
by wachtn
User inputting multiple commands
 
I want to write a program that allows the user to enter commands like this: cout << do what? cin >> move this direction x spaces. What is the best way of d...
[11 replies] Last: one better More than one... (by chrisname)
Need an opinion about this part of code
 
About the following part of code showing below, I would like a help about the function of this code. As I am a begginer in C programming I think that variabl...
[1 reply] : Well the line y=(int)x; is assigning to 'y' the value of 'x' but is... (by mcleano)
Compute pi using arrays.
 
Okay, so I have this assignment to do. It's technically easy.. but I'm just not getting it. I understand the concept partially. I don't know however how to put ...
[3 replies] Last: I think it wants either two single dimensional arrays, x and y , or o... (by PanGalactic)
October 2009 Pages: 1... 1516171819... 25
  Archived months: [sep2009] [nov2009]

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