Beginners - March 2009 (Page 25)

using function to create retangle
 
I'm trying to create a program that print a square (width by length size) with any character the user choose. I'm able to do it with a for loop, but is it poss...
[2 replies] Last: thanks for the hint, that help alot (by takedown134)
Program that assigns grade
 
#include <stdio.h> #include <stdlib.h> int main() { int n; int score; char grade; printf("please ente...
[1 reply] : That's because scanf() is trying to get an integer and it doesn't see ... (by Zhuge)
Several questions
 
I'm working on a Windows XP Pro machine with VisualC++ 6.0. The program I'm working with is a large GUI program written in C++ and using the QT framework. Mos...
[4 replies] Last: Are you using XP or Vista? I just read an interesting, if advanced,... (by grcunning)
Need C++ functions (I'm a beginner)
 
Basically, there's stuff I want to do, and stuff I know I can do, I just don't know how to do then with C++. Firstly, I need a C++ version of soemthing like ...
[4 replies] Last: I've never tried to do that before, however, I recall that SDL (Google... (by Poke386)
Loop problem
 
hey can someone please tell me how to loop this code : #include <stdafx.h> #include <iostream> #include <ctime> #include <fstream> #include <string> usi...
[1 reply] : Use a do-while loop. do { // Code goes here. }while( condit... (by MMZJSFMMX10MM)
Problem using arrays
 
I'm in a begginer c++ class. So far I am doing good until we got to the array section.I been given two questions to answer and I am having problems starting the...
[3 replies] Last: char a =("my name"); for( int n=0;n<20;n++){ if(a ==... (by pimster987)
Open a simple .txt file
 
Hey I am trying to find very basic code to simply open a file which I have created and display the information within it, all this is being done on a win32 cons...
[14 replies] Last: You can try something like this: ifstream file("File.txt"); strin... (by Bazzy)
Global scope
 
Could someone please tell me why this will not compile :S // Use a global variable. #include <iostream> using namespace std; void func1(); void fu...
[11 replies] Last: The Reference section on this site is comprehensive. Check it out; re... (by seymore15074)
Hey new to coding.
 
Hey guys, I'm very new to coding and over the last few dasy I have been wacking my head agains t a brick wall. The problem I'm having is I have been given ...
[2 replies] Last: How about if I use some code like this? int main () { int num... (by DragonKnight)
by Azrad
char vs <fstream> ?
 
I'm very new to C++ (less than 2 days). I've written some code to sort the letters of a word into alphabetical order. If given "jack" I expect it to return "acj...
[2 replies] Last: Hi Max, Thanks for the input. So I took your advise and changed tha... (by Azrad)
Simple Concept Progaram Problem; Ends After Input
 
Here is my header file: //Ian Forsyth #include<fstream.h> #include<iostream.h> #include<iomanip.h> #include<stdlib.h> struct inventory { char ti...
[2 replies] Last: Okay I fixed those minor problems (the checker+ is accidentally left o... (by EVLCrusader)
audible beep?
 
the program i want to write is as follows: a program that uses a do-while statement. It reads in an integer n from the keyboard. If n is not in the range 1 ...
[4 replies] Last: '\7' is the same as '\a' and it's the 'alert' character which will... (by Bazzy)
Problem with dynamic array
 
When I run the piece of code below once, it works properly. However, if I run it twice, then an error message of heap corruption poped up, and if I delete the s...
[8 replies] Last: Yes on all counts. If you've overwritten memory, the applications b... (by kbw)
Overloaded ^ ? What does this code do?
 
I just got this code from the MSDN site to add a control to a form. private: System::Void button1_Click(System::Object ^ sender, System::EventArgs...
[2 replies] Last: It is a handle in C++/CLI (See: ECMA-372) handle — A handle i... (by closed account z05DSL3A)
how should I consider operators?
 
I was wondering how should I consider the operators + - * / are they characters? I am writing a program in which a user input an operator (either + - * /) an...
[3 replies] Last: You can get characters and than is up to you parsing them and performi... (by Bazzy)
code back to pseudo code
 
Hello - i have a short section of what i suspect is C++ code - it is not a language i have any knowledge of - and want to translate it back to "pseudo code" ...
[2 replies] Last: line 18: that means ah.scan = ah.scan (bitwise) OR 2 in binary: ... (by Bazzy)
by zirong
check on number of times a specific element appear...
 
Hi all, i've got a problem in which i need some help in. i've got a list on input as username in a form of a alphabet, any alphabet for each user. now ...
[2 replies] Last: You can use the count algorithm http://www.cplusplus.com/referenc... (by Bazzy)
fibonacci algorithm?
 
Hello there, I implemented this small algorithm for fibonacci numbers calulation. But after fibonacci number 50 more or less it gives a wrong output Its pro...
[2 replies] Last: You may be able to use "unsigned long long". double only has 12 digits... (by turbozedd)
expected primary expression before void?
 
why is that like that? i think my program looks right in the void.....but there an error saying expected primary expression before void..expected";"before void....
[2 replies] Last: ah thanks.. yah right i have many more to debug..like the void display... (by kayem01)
by tan247
Sentinel Controlled Loop
 
I am trying to write a program in Visual C++ 2008 Express Edition that accepts sales amounts input from the keyboard and counts the sales that are at or above t...
[5 replies] Last: Thanks for all of the feedback. Initializing them to 0 got rid of the... (by tan247)
March 2009 Pages: 1... 2324252627... 29
  Archived months: [feb2009] [apr2009]

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