Beginners - April 2014 (Page 48)

Colors help please!
 
Hey everyone. I started programming about 5 days ago so I'm very newbish at this, but I wanted to try and make a simple console program that changed text and ba...
[4 replies] Last: ah missed that, thanks! :) (by Kiddolioable)
functions
 
I'm trying to do a + b = Addition so example 1 + 1 = 2 For some reason its saying 1 + 1 =1? Can someone tell me what to fix so it works please thanks. ...
[2 replies] Last: thanks (by cplusbeginner89)
Bad Pointer for a list iterator
 
Just like the topic heading sounds, whenever I debug my code, my iterator is a "<Bad Ptr>". This only happens in the method where I am trying to write my HashTa...
[1 reply] : for(it = l .begin(); it!=l .end(); it++){ /*...*/ bucket++; }... (by MiiNiPaa)
Libary book store program with fstream
 
hi I need to make a book store libary for my dad because he said he wanted one for his small schoollibary (where he works) and I am on informatics school so I ...
[1 reply] : I have seen a reply by mail but i can't see it here so it might look w... (by p33n kenan)
segmentation fault
 
why does this function create a segmentation fault when executed: has this error to do with it: databary.c:67: warning: format ā€˜%dā€™ expects type ā€˜i...
[2 replies] Last: thank you!! (by p33n kenan)
by rjeezy
Help with File I/O and math
 
I am trying to write a program that will: 1. Output the result into a file instead of displaying them on screen 2. Change the input to read data from a file...
[2 replies] Last: Ok I think I have it down pretty well. I tried to shorten the code (sh... (by rjeezy)
HOW TO DETECT NO STRING INPUT WITHOUT USING A FUNCTION
 
Write your question here. How do I get the user to be re-prompted if the user initially presses the enter key? /* strlen * function returns the length ...
[4 replies] Last: I solved the problem. Thank you for jogging my mind. Here is my code... (by phztfte1)
STRING CONVERSION TO INTEGER
 
Write your question here. How can I change a string to an integer using atoi? See this line: int n_Dolphins = atoi(agrv ); /* dolphins * Write a pro...
[2 replies] Last: JLBorges, Thank you for coming to my rescue for the second time. I m... (by phztfte1)
Reversing an Array
 
Hello, I need help with this assignment I'm working on. I have to write a program that has a dynamically allocated array, of which the user can input the size a...
[2 replies] Last: Thanks! I'll have to go with the second option because the assignment ... (by taylor5479)
Help correcting a caesar cipher function
 
I'm almost done with a program to decrypt text from both caesar and substitution type ciphers. My program is supposed to read the first integer in a text file a...
[1 reply] : typedef char Alphas ; // typedef for char array Alphas Alphabet = {... (by giblit)
How do I convert this to a decimal without using float/double?
 
In the last line, I need to make the previous line's fraction into a decimal but can't use float or double, but I'm not sure how. #include <conio.h> #i...
[1 reply] : You could cast to a float/double. num / static_cast<double>(denom) ... (by giblit)
compare a string for a specific char
 
I am trying to convert a user input string that is supposed to a fraction into a double but it refuses to recognize the / char as a char. Here is the function ...
[2 replies] Last: ok so I used find now (and replaced "/" with const char a =47) now it ... (by digital light)
NEED HELP CALCULATING VOLUME OF SPHERE?
 
The answer is really off, I think it has to do with the way I'm setting up the pi or the 4/3 part but I don't know how to fix it.. #include <conio.h> #include ...
[2 replies] Last: Thank you so much :) (by closed account 3CGE8vqX)
encode/decode
 
i would like to swap letters of the input message to a key that i have below and reverse for the decode a=n b=o c=p d=q e=r f=s g=t h=u i=v j=w k=x...
[3 replies] Last: i got it #include <iostream> #include <string> #include <algorithm>... (by kmtompkins)
Errors with template using nodes
 
In line 41 I am getting the error "a template declaration cannon appear at block scope" and at line 50 I am getting the error "expected ';' before 'template'". ...
[5 replies] Last: haha, thanks I looked through my code to check it but didn't realize I... (by pepstein)
Lists and Seg fault
 
Hi, I know this is a little vague, but I keep getting a seg fault in my code every time it runs. I am trying to make a hash table that is an array of lists. rig...
[1 reply] : Nevermind, I got it to work. THank you :). (by Samariyu)
Word Counter
 
I need to make a program that counts the number of words in a string. I also need to count the number of times a word appears and then sort the array based on t...
[2 replies] Last: This helps a little bit but doesn't really answer my question. How wou... (by tylergarner)
Infinite loop in switch statement?
 
Whenever I choose option 3 it just does an infinite loop or some matrix looking thing. LOL. Can anyone tell me why? I don't think it's in the function but I'm n...
[no replies]
reading lines
 
i would like to read multiple line like if i input "test1 test2" it outputs test1 test2 not just test1 i used getline() but it only reads the first space an...
[6 replies] Last: You are mixing >> with getline. >> will stop as soon as it finds whit... (by Disch)
system("pause") and system("cls") or system("clear")
 
I need help with system("pause") and system("cls") or system("clear") I am using the following: #include <iostream> #include <cstdlib> #include <windows...
[5 replies] Last: @Duoas...I used your code: if (system( "cls" )) system( "clear" ); i... (by jmilby42)
April 2014 Pages: 1... 4647484950... 67
  Archived months: [mar2014] [may2014]

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