Beginners - March 2011 (Page 48)

Can't get this to work right
 
at the end when I type the account number I want to view it only works for the first account number entered. Also when I display the account numbers some have a...
[6 replies] Last: I agree that it is large. But the instructions were "Write a main func... (by ALOTANOTA)
by anzki4
Using variable in function.
 
Is there any way to use a variable in a function? Say for example: int function(int a,int b) { int a1; a1=a-b; return(a1); } int main() {...
[4 replies] Last: Thanks! (by anzki4)
Structs
 
How do you write a declaration for a struct (or class) to store the data?
[1 reply] : http://www.cplusplus.com/doc/tutorial/structures/ (by Bazzy)
Bounds Checking
 
I am making a program that tells you how many possible ways there are from the top left to the bottom right. The grid can either be a square/rectangle or an L-s...
[7 replies] Last: move the concave vertex to (0,0). Now your problem was simplified. I... (by ne555)
by anniet
a program for school but need assistance.
 
#include <stdio.h> #include <stdlib.h> #include <string.h> its supposed to be a program to display a main menu,then a display, calculate the lunch order f...
[3 replies] Last: its supposed to be a program to display a main menu,then a display, ca... (by anniet)
Reference a variable from a different class (error C2597)
 
Hi, I'm familiar with OOP with Java or Actionscript, but now I must finish an application written in C++, and there's an error that seems to not get away, an...
[1 reply] : You want to change a member of an object. It is impossible for a stati... (by ne555)
New C++ user with a question about a calculator program (1,2)
 
Hi, i have been assigned to add to a program i already have (here it is below) //Calculator by Me //Includes the iostream library #include <iostream> ...
[22 replies] Last: Ok thank you Albatross (by airguitarman94)
I want to know how to pass value from constructor to a function
 
I want to know how to pass value from constructor I have created to a function called void displayValue to display the object value created in the main part...h...
[15 replies] Last: Reading a book or taking a class is needed to build knowledge, but for... (by closed account D80DSL3A)
if else loop not inputting good data and bad data right
 
so the goal is to get my program to say bad input and ask for the input again if the characters input are not s, c, g, S, C, G, however ive tried every configu...
[10 replies] Last: Line 41 & 45 are incorrect. To tell the compiler you want the if sta... (by mookial)
by tonnot
How to avoid overload, templates ? How to work with it
 
I have a simple function that can receive any kind of numeric value. My_function (int value) {} My_function (double value) {} .... How can I change this b...
[9 replies] Last: Because the OP said "I'd prefer to find out the var type inside my fun... (by filipe)
by tonnot
How can I do something to automatic comment some function call?
 
I dont know if it is possible. I want to write some line that says to my compiler that where he find 'myfunction' use '\\myfunction'. So I could get to disable...
[4 replies] Last: Thanks doug This is what I'm looking for. Using it I can isolate e... (by tonnot)
Classes and Structures. (Win32 Console RPG game) - which type to use?
 
Basically I am trying to figure out which control structures to use when structuring the following data: Player data. This is initially determined by two ent...
[6 replies] Last: Which would enable you to do various interestening things, like for e... (by Rofflecopters)
by ogward
.txt to array
 
Hi! I have a problem, I would like to crate a function, lets call it readFromFile() and I want it to read the data from a .txt file and put it in a array, I...
[12 replies] Last: My example doesn't work with spaces. I believe there was a stream mod... (by hanst99)
how to check hour in textbox:<
 
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { textBox1->Clear(); SYSTEMTIME st; GetSystemTime(&st); ...
[2 replies] Last: The top part uses pascal pointer notation- mistake? In C/C++, pointers... (by hanst99)
EXC_BAD_ACCESS?
 
I'm writing a number ordering program, and one of my functions is returning EXC_BAD_ACCESS in a place it never has before. void ordernums(float array ) { f...
[1 reply] : And what value is i? When does the inner loop end? (by kbw)
Reading from specific row on notepad
 
Hi! Is it possible to read from specific rows from a notepad? For Example: Jay Mark Christian I only want to display the word Christian which is on th...
[1 reply] : 1. Don't use char arrays as strings, use the standard string class. 2... (by kbw)
2 errors, no sense at all....
 
Hey guys, I am trying to make something like a tactical simulator, just a game, to pass my free time and practice my C++... I am a starter, but I actualy manage...
[6 replies] Last: ok, I went through the code again, error 2 is solved, I had put the sa... (by homervp)
clearing screen issue
 
Hello Experts, I am new to C++. I was using clrscr() in one of my program and the compiler reported error that clrscr undefined. I have used the header conio...
[2 replies] Last: I found one interesting function for the same: system("cls"); st... (by abhiverma812)
Reading and writing files
 
I have a program that prompts the user to enter a file name which in my case is grades1.txt which has the numbers 90 86 95 76 92 83 100 87 91 -1. Then I want it...
[2 replies] Last: I'm still a little confused so what do I do to fix readFile() I want i... (by ElectricClam148)
Implementing the binary search tree algorithm
 
write a C++ program to implement the binary search tree algorithm, and the in-order, pre-order, and post-order traversal algorithms. show your output for these ...
[1 reply] : I am also trying to make Binary tree which can sort the data in asce... (by abhiverma812)
March 2011 Pages: 1... 4647484950... 52
  Archived months: [feb2011] [apr2011]

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