Beginners - April 2010 (Page 28)

How to remove characters from char?
I would like to remove certain characters from a char. lets say the char is "abcd" how could i remove the b character and make the char equal to "acd".
Apr 8, 2010 at 2:55pm
[11 replies] Last: I know it's helpful, but it's still abstraction. But a C++ string is ... (by chrisname)
program wont solve
I can ask the user how much he will pay but the program wont solve it. change=cash-total(items bought) #include <iostream> #include <iomanip> #includ...
Apr 8, 2010 at 2:24pm
[19 replies] Last: I would recommend using cout.fill() instead of cout << "-=-=-=-"; (by superusr)
Sorting indices of a matrix with qsort
I have a matrix, A, and I want to sort the row indices by the second col, but I don't want to change A. I created an array to keep track of the indices and was ...
Apr 8, 2010 at 1:27pm
[3 replies] Last: You're welcome. Beware that I just typed that in. Some revision mig... (by Duthomhas)
how to access and individual item from a stack?
i want to get the item just before the last item in a stack. is it possible, and if so how? i've tried it myself by doing: stack <int> S; ///push stuff ...
Apr 8, 2010 at 12:55pm
[2 replies] Last: You can pop until the position you want to check and then push everyth... (by Bazzy)
Need program that uses Pointers for Int, double & Char
Coding that I have so far works great, with the exception that when I have to increment the pointer int gives me like an error negative Here is what I got so...
Apr 8, 2010 at 12:55pm
[3 replies] Last: *(++ip) means that ip will point at a different adress that u have not... (by TunaPete)
Using header files for functions (a question of style)
I have a bunch of different functions that takes a few hundred rows each, so I like to have them in different files. If I understand correctly it's bad style to...
Apr 8, 2010 at 12:16pm
[4 replies] Last: Thanks a lot! interesting to see some real code :). The functions are ... (by TunaPete)
by rijia
Decrypting stream cipher in a simple program.
Hello! I'm trying/testing some stream cipher where, the key changes every time when it goes to the end of it, and then uses the new key again for the next decry...
Apr 8, 2010 at 10:00am
[4 replies] Last: I should get lostpedia as the decrypted text, instead of that i get ... (by rijia)
Printing to the screen.
This code is supposed to find all of the perfect numbers up to 100,000. I can get it to compile but I can't get anyhting to print to the screen. #include <io...
Apr 8, 2010 at 5:53am
[1 reply] : First: please put the code in code tags, it makes it much more readabl... (by closed account jwC5fSEw)
adjacency matrix row loop
Hey everyone i was wondering if i could help me out. Im trying to count the weight in each row of this adjacency matrix, but i cannot figure out a way to add up...
Apr 8, 2010 at 5:53am
[1 reply] : Never mind i figured it out, i feel so air headed. void WtGraph:: ... (by Pugnap00)
Something is wrong with my loop....
I have been given an assignment to code a program that will calculate student's average's and overall average's. I am copying and pasting the word-for-word tea...
Apr 8, 2010 at 4:21am
[2 replies] Last: I'm sorry. I just tried that and it asks for a student name, then for... (by mbrinkley)
Odd errors - linked list headache
Hey, It's me again. I'm having some trouble with this program. I'm not sure why I'm getting errors. It all looks correct to me. /***************************...
Apr 8, 2010 at 12:32am
[6 replies] Last: Thanks, I was looking at an example while doing this. I thought in.get... (by radikll)
by Snooze
Completely Stuck (1,2,3)
I have to create a program that accepts a mixed number from the user (6 digits past the decimal min) in the main () function, and passes the mixed number to two...
Apr 7, 2010 at 11:47pm
[41 replies] Last: Thanks :] Got it working now. (by Snooze)
problem adding objects to std::vector
Hi, I'm trying to add an object to a std::vector. I searched the web and this site and it looks like it shouldn't be a problem. My code runs fine right up un...
Apr 7, 2010 at 11:22pm
[4 replies] Last: Howdy, I botched this one. I went ahead and rewrote it as a simp... (by uiberto)
Conceptual explanation of: double (*p)[3][4] = new double [2][3][4]
What does double (*p) = new double mean in english? How do I access individual elements of p?
Apr 7, 2010 at 11:18pm
[9 replies] Last: THANK YOU! (by stavros)
Problem with reading input.
Hey guys. i am trying to write a program which will read input from a text file, check if each line contains any alphabets and then display a message imforming ...
Apr 7, 2010 at 11:11pm
[2 replies] Last: Consider switching the order of the statement as a general practice. I... (by kempofighter)
by Somarl
Problems with sort() (1,2)
Hi, i am still trying to do the pancake glutton problem which is really got me stumped now (making me feel like im not cut out for this lark tbh as ive been try...
Apr 7, 2010 at 11:03pm
[30 replies] Last: Somarl, in the original example you created a vector of 9 elements but... (by kempofighter)
Find lowest index in array
For my C++ class we have to make a program that generates 5000 random numbers between 1 and 53, then outputs each number and how many times it was generated.The...
Apr 7, 2010 at 10:45pm
[4 replies] Last: A better way would be to #define constants, or use iterators when goi... (by kempofighter)
Console Application Beta Testing
I am having a console application tested for bugs by a friend. What are some of the things to watch out for? I am not talking about skipping an input when the u...
Apr 7, 2010 at 9:47pm
[1 reply] : The ctrl-c command is notorious for closing console applications. /jo... (by tummychow)
if-else if, What am I doing wrong here?
This should be one of the easiest things I do. I look at other people's code, and everything looks like it should be right. It just will not work. My code: ...
Apr 7, 2010 at 8:45pm
[7 replies] Last: I'm going to go back and add in the logic for greater than 100 and les... (by killingthemonkey)
program .. determine if the year is leap or not
hi Problem : ---------------------------------------------------------------------------- write a program that reads a year and determin and print whtether...
Apr 7, 2010 at 8:19pm
[7 replies] Last: #include <iostream> using namespace std; int main () { int year; ... (by Pmishra)
April 2010 Pages: 1... 2627282930... 35
  Archived months: [mar2010] [may2010]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.