Beginners - April 2010 (Page 22)

Command Prompt input
 
Hello, In the Linux terminal I can do something like *.exe < *.txt and the program will run and read in strings from the text document as opposed to manual...
[1 reply] : getline is the correct choice for reading text files one line at a tim... (by kempofighter)
tic-tac-doh!
 
Hello, Am starting off on the tic-tac-toe exercise and have just tried to cout to terminal a 2-D array of lines but have received the segmentation fault mes...
[18 replies] Last: That's what I did when I got to that stage. Making it take a win over ... (by closed account jwC5fSEw)
compile multi files and variable declare and define
 
I got three files: p1.cpp, p2.cpp and p.h and they are defined as: p.h: #include <iostream> using namespace std; extern int x; const int z(9); void dis...
[3 replies] Last: static says that it's going to be local to that file (by Bazzy)
How to input Chinese character?
 
I have a .txt file . I want to input the chinese character in the file and then do some programming. After performing the program, I want to output an output...
[12 replies] Last: Is my understanding correct? Thanks again! (by wisu0420)
Question
 
Hi i have a problem! i created 3 source files, and i cant find how i can add them in my program. i dont mean the include. i mean to give the option to the us...
[4 replies] Last: one program cannot have two int main()s (by hamsterman)
windows app
 
I am making a windows app but the compiler returns the errors while using cout: I have using namespace std; error C2143: syntax error : missing ';' before '...
[12 replies] Last: I pmed you so a whole bunch of people dont reply at the same time. I ... (by collinisaac0104)
templates and operator overloading
 
What am I doing wrong? Here is some code: friend ostream& operator<< <>(ostream& os, const binary_tree<T>& bt); template<class T> ostream& operator<...
[2 replies] Last: Thanks! It works. Good to know. (by adikid89)
by xeyide
srand and rand for random numbers
 
I'm trying to make a function that will produce three random numbers every time its called. I've read up on srand to seed the random number generator, but the d...
[3 replies] Last: braces People who flip out on brace placement are losers. http://e... (by Duthomhas)
by Erco21
Splitting text from line
 
Hi! Im new to C++, but i already know everythingfrom tutorial on this site. I have created a program to read a text file, and print it as one line now,...
[2 replies] Last: Okay, i didnt exactly find what i was looking for in first place, but ... (by Erco21)
About pointers
 
Hi, I found a syntax that I hadn't known before. Can somebody explain to me WHY this works? #include <iostream> int main() { const char* cp = "abcde...
[2 replies] Last: Oh, that's not too difficult and I should have been able to figure it ... (by fenvariel)
Invalid conversion error!
 
Hey, I was just making a program that, when a string of numbers and letters was entered, it would strip away any numbers and output all the letters. heres my co...
[3 replies] Last: Thank you Duoas for this, I really didn't know any other way to do it.... (by Hawk11235)
by EruEru
Browse Image
 
Hi, i need to use visual studio C++ to create a browse button to browse a photo from my desktop into my picturebox.. i have try to use CFileDialog Class[^]. b...
[2 replies] Last: Also, could you explain what you mean by "browse"? (by helios)
(i/o streams) making a function to output to a file
 
Hello, I am trying to make a function called void print() but i don't know exactly how to write the function parameters here is how my main would look ...
[4 replies] Last: nevermind, i forgot to add the std:: in front of ofstream. thanks! (by bombatwist)
by Ishtar
MySQL++ MinGW Tool Chain
 
Hello Everybody I seem to be getting lots of compiler warnings when trying to link against MySQL++ 3.0.9. GCC version 4.4. I am trying to compile the fol...
[1 reply] : Are you linking to the library statically or dynamically? If you ar... (by sinoth)
How can I check if user has properly entered numbers not alphabets??
 
Hello, I've got some problems in checking whether the input data are numbers (double) or not! I find that "strtod" will be useful...but as I'm a beginner of C+...
[3 replies] Last: Thanks a lot oghmaosiris & kempofighter !! I'll try it tonight! (by francis1212)
Ways to make Change.
 
Hello, I was wondering if I could get help with a problem we received in class for fun. We did the first part of it (Break down an amount into change and displa...
[no replies]
leanear search not coming up with more than 1
 
I am having problem with my program, This is the first time i have tryed to post a program, so if i am doing somthing wrong just say, The problem i have is w...
[no replies]
holding decimal places
 
Hey i very very new to c++, I am working on a program to have the user enter numbers and have a linear function search to see if the number has been entered in ...
[2 replies] Last: Thanks for some reason i was getting errors with losing data from cha... (by tman0312)
alphebitizing a list
 
I have to do a program for my class that involves reading in a list from a file and alphabetizing the names. I have written the code except for the alphebetizin...
[1 reply] : Hmmm you could do it this way: use the ASCII numerical values of eac... (by mcleano)
having a hard time with logic
 
So i've been struggling with this program and everytime I figure something out I get stuck on something new.The program is supposed to count the number of words...
[4 replies] Last: thanks Jahmbo, unfortunately i cant use vectors in this exercise :-( (by flyraf821)
April 2010 Pages: 1... 2021222324... 35
  Archived months: [mar2010] [may2010]

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