Beginners - November 2010 (Page 33)

Dynamic Memory Delete Problem
 
I'm not so good at this so apologies for any obvious mistakes. My problem consists of two functions of a wider algorithm. To simplify I will call them U and S....
[4 replies] Last: The interesting thing is by adding cout lines (e.g. cout << "Blah Blah... (by linverno)
Function to display array is displaying garbage as well
 
/* * book.cpp * *Simple program for storing array of book titles and published dates * * Created on: Oct 9, 2010 * Author: Alpha */ #includ...
[1 reply] : You are doing something very strange. You make two arrays: Bo... (by guestgulkan)
converting char* to int
 
Hi, when trying to convert this: char* buffer = "asddddddddddd 500 what"; to int it gives "0" heres my code: #include <iostream> #include <cstdlib> i...
[4 replies] Last: Thanks (by FeZedra)
Converting numbers and characters to words
 
hello im having one problem to do the homework i dont know how to create one program that convert numbers and characters to words like 1, 2 ,3 appear on...
[1 reply] : Make an array of strings. const char* number = {"zero", "one", "two"... (by hamsterman)
while loop problem
 
So I'm trying to create a loop so it would check all the characters in a string array, but I cant quite execute the while loop so well, I'm thinking it keeps on...
[7 replies] Last: I'm not familiar with linked lists. If I were you, I'd mark this th... (by jamesmk)
by sk1tz0
Rational Numbers Reduce Function
 
Hey guys, I know what needs to be done but I cant figure out how to write the code... n = numerator; d = denominator; If the numerator > denominator then...
[1 reply] : That's euclidean algorithm. there is some pseudocode. http://en.wikipe... (by hamsterman)
by afrg
putting a vector of ints into a string
 
Hi, I'm trying to take a vector of type int (vector<int> val;) and concatenate/stick it all into a string, so the string is a list of ints, this is what i've d...
[5 replies] Last: thanks, i'll try that. though I figured there should be a more simple... (by afrg)
by cesoxa
overloading cast operator
 
Hello guys, i need a simple code exemple with a overloaded cast operator. I need to call something like this: myClass C; C = (myClass) 20; where ...
[6 replies] Last: 1) Again, this is better off as a constructor for B. Not as a cast o... (by Disch)
by afrg
member function constructor takes an int into a vector
 
hi, what i'm trying to do is to make a constructor in a class, which takes in an integer and creates a vector one element long of type int and puts the int int...
[2 replies] Last: thanks, i found where the segmentation fault was, and indeed it was no... (by afrg)
functions
 
please is it possible to have a void function as one of the arguments of another void function????
[1 reply] : You can pass a function pointer or a functor http://www.cplusplus.com... (by Bazzy)
Simple Function Question (i think)
 
Hi peeps, Heres some code i'm writing up at the mo. ive come across a funny little problem i can't get my head round. All i want to do is i want my 2 functio...
[2 replies] Last: Errr yeah, got what you were saying and made it this way #include ... (by closed account 2wC9GNh0)
Encryption & Decryption
 
I have encountered some problem here. What I wanna do is to encrypt a sentences by invert the letters. Eg, i love you -> r olev blf However, I don't know wha...
[1 reply] : It is hard to read your code, because you used [ output] blocks inste... (by Duthomhas)
by firix
How do I debug CLR ?
 
Hi, how to integrate active "CLI"? Before compiling clr switch, I need to put Where?
[2 replies] Last: // regex_simple.cpp // compile with: /clr #using <System.dll> usi... (by firix)
system("cls")
 
Well I saw in one of the post up there someone said don't use pause or die in fact never you system any thing. So I can replace pause easily but how do I replac...
[2 replies] Last: Is the problems solved. (by firix)
system("cls")
 
Well I saw in one of the post up there someone said don't use pause or die in fact never you system any thing. So I can replace pause easily but how do I replac...
[2 replies] Last: Is the problems solved? (by firix)
the else-statement of my if-loop doesn't work in a function calling itself
 
Hi, I've just started to learn C++ and I'm using the cplusplus.com-tutorial as well as this highly recommendable German website: http://projects.eml.org/bcb/p...
[1 reply] : You can't do 1<=a<=2 or better, you can but it doesn't do what you t... (by Bazzy)
by schim
ASCII & hex interpretation problems
 
Hello everybody, I'm having problems with an auto update program of mine. It's supposed to download updates from a website, here's how it should work: 1. ...
[no replies]
display words in a string separatly
 
hi i am trying to make a simple code. what i want to do is user will enter a string and this code will display each word in that string separatly. here is...
[1 reply] : Your code prints the string for every white space found. If you have a... (by hamsterman)
hello i have a problem with getline function on structure * pointer
 
hello i have a problem i used an structure to make a database of movies that the user sow i came from the tutorial on the site i just made it to interact wit...
[3 replies] Last: well, if you don't like cin.ignore(), you could use cin.get().. or you... (by hamsterman)
integer wrap around question
 
I'm new to c++ and learning from a book. One of the programs I am supposed to be writing demonstrates integer wrap around in part of the code. the code is scor...
[1 reply] : Is that the entire code you're giving the compiler? (by helios)
November 2010 Pages: 1... 3132333435... 42
  Archived months: [oct2010] [dec2010]

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