Beginners - March 2009 (Page 20)

by ad126
pointer query ...
 
What is wrong with this program, int x,*p; x = 10; *p = x; cout << p << " " << &x; This works, came across in a book saying it is danger to ...
[3 replies] Last: Thanks.. (by ad126)
by token
Different Ways to Write to File
 
What's the difference between these two source codes that do exactly the same thing? Is one method safer than another? #include <iostream> #include <strin...
[3 replies] Last: Yes. It takes less time to write and you don't have to remember to put... (by eker676)
by Sabal
Random number generator
 
hello, is there a such command that will take for example : (int n) and apply a random number, maybe 1-1000 into n 's place? Thanks
[2 replies] Last: Thanks, this is what i was looking for, i will test it out now (by Sabal)
STOP POPPING UP OF DOS WINDOW WHILE USING SYSTEM() COMMAND IN C PROGRAM
 
Hi, I want to run a DOS command from my C program - and I can do that fine, but I want to do it without the Command Window popping up. Is there a way to do t...
[2 replies] Last: CreateProcess(): http://msdn.microsoft.com/en-us/library/ms682425.aspx (by helios)
by Steve
Borland C+ compiler install issue!
 
Hello , firstly , if you read this it is much appreciated. Secondly , help is even nicer , so on to my problem. I would like to learn to program in C++ but cann...
[15 replies] Last: Personal Messages. (by helios)
Problem with string getline and alignment
 
Hello. Im using string to get and input for studentID and studentname but there seems to be an error when I run the program. I want to have the studentID ente...
[no replies]
using cin and wcin in the same program
 
Hello, I try to learn C++ and have a question regarding cin, wcin and unicode. I wanted to write a small program which opens a file and if the file doesn't ...
[no replies]
by jp21
asterisk patterns
 
my code is working but I cannot make it function the right way, my program should display the following pattern, given the value of n and m. example if n=5, and...
[1 reply] : Please use [co de][/co de] tags for code. Makes it so much easier t... (by Disch)
by Nath5
Reading from a text file
 
I am trying to read lines from a text file whose name is passed as a command line argument. I have tried numerous things but have been yet been able to get the...
[8 replies] Last: Yes it compiles without error and then says cannot open list of words (by Nath5)
by audrei
???
 
How to declare a two value to a character and what is the code to convert a character to integer?
[5 replies] Last: to convert character to integer char c ={" hi"}; int t=atoi(c);... (by quddos)
Trouble using execl
 
Hi, I'm trying to teach myself a little bit about system calls by making a simple shell. I've made a copy function and I'm trying to call it with my shell but ...
[3 replies] Last: Mmm, also you have a memory stomp. You cannot strcat() anything to ... (by jsmith)
by Bodwin
My bugged calculator.
 
Hello everyone! I just started learning C++ 3 days ago and today I decided to test my skill and try to make a calculator which does addition, subtraction, multi...
[3 replies] Last: Thanks Bazzy that worked great. Thanks for the useful tips the program... (by Bodwin)
need an answer plzzzzz so imppppp
 
can any one make this: Develop a program to perform some statistical analysis for a well-formed input stream. The input consists of three lines read from th...
[3 replies] Last: anyone could tell me (by mando90)
by Sabal
Problem with loop/function
 
Hello, i am fairly new at programming, I wanted to create a program using loops and functions seeing as how i just learned them. I have gotten it to do what i w...
[1 reply] : please use [ code] tags. In your function you have an infinite loop... (by Bazzy)
by masiht
functions
 
#include<iostream> using namespace std; short able(short&,short); void baker(short&,short&); void charlie(short,short&); int main() { short x=2,y=3,resu...
[4 replies] Last: change a2 to be passed by reference: short able(short &a1,short &a2) ... (by Bazzy)
by berge
int vs unsigned int
 
Hi! When should I use unsigned int instead of int? Should I always use it when I have a loop like this: for (unsigned int i = 0; i < SIZE, i++) { some co...
[5 replies] Last: size_t is a typedef of an unsigned type (by Bazzy)
by quddos
Please guide me
 
how can i exit a runnig program by pressing "esc " key. actually i want to use it in my minesweeper assignment.the game is complete . but only that portion is...
[15 replies] Last: it dont work program doesnt exit . regards quddos (by quddos)
why .h with conio
 
#include <iostream> #include <conio.h> using namespace std; int main() { int andy=23; cout<<andy; getch(); } Why do i have to...
[1 reply] : It is because conio doesn't exist. Here is a link I found that gives ... (by kempofighter)
string_replace?
 
Is there a substr_replace in c++ like the one in php? like it would replace all substr s with newstr? Thanks!
[4 replies] Last: I am using the win api ini reading functions, i want to turn all ~ int... (by PickleMan)
Concatenating Multiple char* s (unsolved)
 
I have the following code: char* attacks; attacks="Choose an attack!\n\n"; for(i=1;i<=ini.ReadInteger("config","number",0);i++) { atta...
[5 replies] Last: What are you trying to do? Are you trying to set the world record for... (by kempofighter)
March 2009 Pages: 1... 1819202122... 29
  Archived months: [feb2009] [apr2009]

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