Beginners - February 2015 (Page 39)

How to navigate a program without goto
 
Hey everybody. I am a really new beginner, working and reading through the tutorial for C++ on this site, and I was wondering how experienced programmers avoid...
[1 reply] : The use of loops is generally used in place of goto. goto, in larger p... (by Bogeyman)
how to check if user input is within a file
 
- the user enters a 10 digit number. - the program takes the first 3 digits and checks if the 3 numbers are in the input file. - file goes from 100 - 999 ...
[1 reply] : Try and read the numbers from the file, at the moment you don't do any... (by tipaye)
How to extract words from files
 
I want to know how I can extract words from a text file and store them in a char array. The file will probably have to store hundreds of words. FILE *in...
[5 replies] Last: Okay so I did it eventually with a simple function. Just this: TrieN... (by hornet07)
cvs
 
That is cvs .As used in DevC ++
[no replies]
by Skanin
Calculator square root
 
Hi. I am new to c++ and started building a simple calculator. I did manage to make it to the easy stuff like plus, minus, multiply and devide. Now I want to ad...
[2 replies] Last: Thank you! :) (by Skanin)
i dont know how work getch in this code
 
i have a doubt with the funtion getch on this code char a= NULL,b=NULL; while(a!='a'){ if(kbhit()){ a=getch();} b=getch(); cout << a; ...
[2 replies] Last: Here's what's happening: - you start the program - running at a billio... (by dhayden)
Does condition of for loop calculate for every run?
 
When I make a loop that uses a function in a condition, such as: #include <iostream> #include <cmath> using namespace std; int main() { int a; cin >...
[4 replies] Last: I don't see what's wrong with this code since the output shows that x ... (by coder777)
cctype and conditional cin usage
 
Hi! I was doing some programming when I was stuck with a problem. How do I go about using cctypes? I mean: 1. #include <iostream> #include <cctype> using n...
[3 replies] Last: Oops, I had forgotten to change the "if" to "while". I was expecting ... (by Drakonaut)
Pointers, Dynamic Arrays and Structures
 
Hi guys! I've started learning C++ like a few months back, but I'm stumped with a concept. I've searched the web but I couldn't get the answer I needed. I unde...
[2 replies] Last: Thanks for the information! It clears up my doubts! (by Drakonaut)
read file name from folder.
 
hello i want to ask for help. i need to read a png file_name from a folder. can someone help me how write a code in c++?
[no replies]
by Chase
Please improve my code:
 
I was trying to creat a code which reads input from file. The names were separated by "_" (underscore). The function reads the first string in the file, which i...
[no replies]
How to find the highest value in a vector?
 
I can find the lowest value, but not the highest value. I don't understand what I am doing wrong. Any help will be appreciated. Here is my code: removed ...
[9 replies] Last: anup30 thank you so much! (by skwigelf)
by cibide
Problem from 50 to 100(both included)
 
Hi... I made this simple programm but now I can understand why I am having problems when entering number from 50 to 100... it always says in the end "00 a 49".....
[3 replies] Last: Many thanks, I was really blind... and ty for not just coirrecting but... (by cibide)
by kiri
Aligning a cin to the right
 
How to properly use setw with cout and cin How to align the output of cin to the left by 30 cout<<" Example for Cplusplus Forums "; cin>> output; ...
[6 replies] Last: What do you want to print? And what should the output look like? You ... (by JLBorges)
Not understanding errors and try{} catch{}
 
My task was to create program that would test whats the biggest Fibonacci number thats fits in int (Next number is sum of 2 previous numbers) 1 1 2 3 5 8 13 21...
[5 replies] Last: Wow tnx a lot, Disch. This was very well explained. I feel like unders... (by etrusks)
Just a look over of my current code?
 
Could someone just look over my code and make any suggestions? I know that my code does exactly what I want and the format is correct. I just am curious if ther...
[2 replies] Last: Thank you so much. This is exactly what I was looking for. I have a 72... (by TieRein)
by Sym8
how to find multiple occurrences in an array
 
im not sure how to go about in doing. ive tried implementing some techniques ive seen but to no luck , they havent worked. Can anyone guide me to the right dire...
[6 replies] Last: well i tried a different method since im clueless with std::map, but i... (by Sym8)
Compiles but behaves wierdly - C++
 
I'm trying to write code for a function which would reformat code into a new format using a struct Entry , and a sub array. Ultimately, the idea is to read the ...
[1 reply] : #include <iostream> #include <string> #include <cstring> std::string... (by JLBorges)
Function for sorting strings not working
 
I've been trying to get this function to work for a while now but it's not happening.. Basically I need to make the function sort the strings in an alphabetical...
[2 replies] Last: Ok I fixed it and everything works now thank you!! (by agamatr)
Passing and Returning C strings
 
Hello, I am familiar with C++ but I have to write a function in c. I have to take a null pointed string and return it reversed. Seems simple enough my question ...
[2 replies] Last: Thank you much. Its a big help! (by ajiphone)
February 2015 Pages: 1... 3738394041... 52
  Archived months: [jan2015] [mar2015]

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