Beginners - June 2012 (Page 10)

Counting the number of words in a string
 
I am trying to count the number of words in a string. I am going to do this by counting the number of spaces in that string. My program will not run, and I ca...
[3 replies] Last: And instead of char sentence ; strcpy(sentence, "I am Legend."); ... (by vlad from moscow)
Pointers
 
I just read a large section of a book on pointers and I have a question regarding them. When should I use them and why would I use them? The seem sort of poi...
[6 replies] Last: Thanks blacksheep, I came here to...point that out. (by rollie)
Need help for simple program?
 
The prompt my teacher has is below, I have it done the program already but I haven't used ignore,peek,get, and putback, so can someone please show me how to use...
[1 reply] : http://lmgtfy.com/?q=cin+peek+example (by rollie)
Use fstream on opened file
 
Hello, i need to know how to use fstream to edit opened file ( binary ) with openfile dialog. I used this tutorial http://www.daniweb.com/software-developm...
[5 replies] Last: thanks very much it worked had to remove line 24 to make it work.... c... (by demon64)
by djru
Latest attempt at this loop
 
Okay i'm still working on my calculator and i'm at the last part and can't get my loop to work correctly. I need my program to receive the first number, displa...
[7 replies] Last: Don't use do while loops - they can be as confusing as hell. Use a whi... (by TheIdeasMan)
by uhh
Reading in first and last name from a file.
 
#include <iostream> #include <fstream> #include <conio.h> #include <string> #include <iomanip> using namespace std; const double PI = 3.1416; int main () {...
[3 replies] Last: Well then you've got to start thinking. That's what programming is. Th... (by Moschops)
Fill array with random numbers
 
I have an exercise where I'm required to create an array of any size and fill it with random numbers. There's something in this strain of thought that is wrong:...
[2 replies] Last: Thanks for the quick reply, it worked like a charm. many thanks (by sfBlackfox)
by digrev
about struct
 
hi everyone could you plase say what is wrong with this code i just get the first person's information in the array #include <iostream> #include<conio.h> ...
[9 replies] Last: @Peter87 Thanks, I have also seen it but at the first glance it seems... (by vlad from moscow)
What C++ Books Should I Get ?
 
Hello, i want to learn c++ but i don't know what book to start with could someone help me out ? And could anyone tell me what good begginner, intermediate and ...
[1 reply] : There's a peer-reviewed list of high-quality C++ books maintained at S... (by Cubbi)
Transitioning to vectors
 
Hi there. I need to be able to use the front and back commands in vectors in order to modify only the first and last nucleotide of my input into my array... ...
[4 replies] Last: simple answer: if (i == 0 || i == sequence.size() - 1) sum -= 75; ... (by Lowest0ne)
Getting an Error Message
 
Not sure why I am getting an error message with this code. Could someone please point me in the right direction? error messages: 1 IntelliSense: this declarat...
[6 replies] Last: Got cha. Thank you. (by Diana Magers)
Virtual classes (Java interface style)
 
Hello. Ive been doing c++ for a while but then suddenly i felt for trying Java also. I came across interfaces in java and i liked them immedeatly. I couldnt ...
[3 replies] Last: Ahh i see, Thank you for the reply again peter! Solved! (by stoffe1100)
Basic Encryption changes file size O.o
 
I was creating a basic encryption Console program. and i found that after encrypting the file size was changed. it just increases the value by 3 of any characte...
[7 replies] Last: Thanks for explanation. that solved my problem. (by time to c)
by dancks
If statement never executes???
 
I am making a game using Allegro game programming library. Basically its the same one that I asked help with a year ago. I gave up and came back to it this summ...
[6 replies] Last: so I noticed: al_set_target_bitmap(al_get_backbuffer(display)); al... (by dancks)
by co1ote
change stdout position
 
Hi, I'm trying to change the position where fputc('A', stdout) inserts a char. I want to insert a char in a specific position in the console screen. For e...
[no replies]
Need Help with If and Else Assignment
 
I am taking a beginners C++ class and I do not know how to even begin this assignment. Can anyone help? Write a program that accepts two numbers – tempera...
[6 replies] Last: Cout and Cin in your code should be cout and cin. This won't compile, ... (by TheIdeasMan)
by mpdasa
My first program doesn't work
 
I created my 1st C++ program using CodeGearâ„¢ RAD Studio 2009 . #include "std_lib_facilities.h" cout << "Hello, world!\n"; system("pause >> null"); ...
[1 reply] : Your first program shall have the main function. (by vlad from moscow)
error: 'Stack' is not a template type &...
 
hi... please help me...I am in a hurry! I have some error in my code, I must make stack whit linked list...my class inherits from a class called Collection......
[2 replies] Last: my problem was using template class & friend it with another class! (T... (by saeedeh)
visual c++ annoying error
 
Help in visual c++ cause i am new to visual c++? Hey guys i have a problem i am new to visual c++ so i wrote this testcode invisual c++ void test() { for(int...
[1 reply] : please use code tags net time you are passing the object "Working" in... (by Jikax)
by djru
returning parameters to main
 
I am trying to make a simple calculator and the only problem I am having so far is returning my variables to the main function for another function to use. Thi...
[4 replies] Last: you could also use structures: typedef struct { int a; int b; in... (by Jikax)
June 2012 Pages: 1... 89101112... 51
  Archived months: [may2012] [jul2012]

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