Beginners - August 2011 (Page 24)

Opening a file, reading lines - NOT working
 
Attempting an exercise in a textbook: it asks to open a file, ask the user how many lines to display, and to give the option to keep going or quit viewing by me...
[1 reply] : Change the array to a std::string/ try the following out: std::stri... (by manasij7479)
Capturing User Input
 
I need to capture user input with each word stored in a separate variable. I also need to pause (like with cin) to let the user respond. I'm having trouble wi...
[3 replies] Last: This is perfect. Thanks! (by joatmon)
by DouDou
Simple syntax for mutiple && conditions when comparing two arrays
 
Hello, Lets say i have two arrays myArray1 and myArray2 each with 3 elements if i want to have the following condition if ( myArray1 == myArray2 && m...
[1 reply] : Well you could do something simple like this =] bool isdifferent = ... (by ultifinitus)
Need help with c++ classes.
 
I'm supposed to re write a previously written small program using c++ classes. This program two functions to convert temperature units. The program should co...
[5 replies] Last: Don't forget to destruct conversions(); (by graham sullivan)
How to set values for variables in a class
 
I have to create a small program which contains a header file, and an implementation file where the body's of the functions are written and another cpp file to ...
[1 reply] : How are we supposed to help without seeing your code? (by Athar)
Check char for number or letter/symbol
 
char c; string input; cout<<"Enter name: "; cin>>input; input.erase(1,input.size()); c = input; what I'm trying to do: if (char) c is filled with ...
[2 replies] Last: Thanks (by Shay9999)
Returning assigned string variable
 
ok, so I'm new to programming and currently trying to get a running knowledge of some basic C++. This is a practice program. The order menu is called fine, b...
[2 replies] Last: Thanks! guess it was just a matter of putting cout before the function... (by gamesizart)
cURL creating directory
 
I am trying to create directory, using cURL library, but I can't get it working. sprintf_s ( info, sizeof info, "mkdir %s", dir ); curl_slist * slist = ...
[5 replies] Last: Yea, I'd figured that out, but still thanks. (by Scottas)
Book Suggestions
 
Hey so here is what I am looking for. I am looking to write a peer-to-peer program for educational purposes. When it comes to C++ I am a n00b but not necessaril...
[3 replies] Last: Oh thats useful! thanks.. Im still looking for books that will be help... (by cscho0415)
diamond inheritance problem
 
hello everyone. i'm trying to do a diamond inheritance problem. #include<iostream.h> #include<string.h> #include<conio.h> class STUDENT { pro...
[3 replies] Last: That's not crossposting. That's posting a question on multiple venues... (by manasij7479)
beginner exercise went wrong
 
#include <cstdio> #include <cstdlib> #include <iostream> #include <string> using namespace std; void pcguess(); void userinfo(); void intro(); int main() { ...
[3 replies] Last: I think you should to look in your code and actually SEE how it actual... (by eraggo)
critique my code please
 
Here's a simple game I wrote, you think of a number and tell the computer if its guesses are too high or too low or just right. Anyways I would like someon...
[14 replies] Last: //iRandom = rand() % 100 + 1; CompGuess = rand() % 100 + 1; //or Rand... (by ne555)
beam = new (beams*) [numElements]
 
Ok, so this is a really basic question (or at least I think so). What I'm trying to do is to use the default constructor to create an array of type beams that ...
[7 replies] Last: Okay, "beams" already was declared as a Beam** (pointer to a pointer... (by Disch)
Post Increment Operator
 
I was told by my 'C' tutor that the post increment operator comes into action when the statement in which it has occoured has terminated that is after ';' symbo...
[8 replies] Last: [quote=CPPAlien] I am intrested in its boolean value that is, the resu... (by closed account zb0S216C)
Shallow and Deep copies
 
I wanted to ask about the idea of them because I didn't find anything about it in the tutorial ... thanks .
[1 reply] : A shallow copy copies a pointer. A deep copy copies what that pointer... (by Disch)
Bizarre experience with feof();
 
Here's a simple code that's giving me a headache. It reads from a text file that has 3 lines in it. I have a hunch that it may be an IDE bug, but here it goes. ...
[2 replies] Last: I see, so that's what this was all about. Too bad the compiler didn't ... (by closed account DGvMDjzh)
makefile error
 
Hello, I have just downloaded a c++ package called TSNEAT, which is compiled with this makefile. However, when I run it using make in ubuntu, I simply get ...
[no replies]
strcmp(std::string, const char*) error
 
Hello all! Read a little about using regex in C++ and everything pointed to Boost, read about using Boost and it seemed beyond me to actually get it running....
[3 replies] Last: Thanks all! In the end this did the trick: if ( (std::isdigit(sMove... (by purefan)
Array [Subtraction]
 
#include <stdio.h> #include <stdlib.h> int main(void) { float *Numbers = NULL,J , BiggestNum = 0,Total = 0, Q; int InputBuffer = 0; int I = 0 , Total1=0...
[12 replies] Last: thanks for all ur help err.... it is actually coincidental :) anyway ... (by Frozendog11)
Putting Function In To A Program
 
#define PI = 3.14159265 #include <stdio.h> #include <stdlib.h> #include <math.h> #define PI = 3.14159265 int main () { int option; char repeat; s...
[15 replies] Last: Thanks for all ur help and i added the free () into it .. (by Frozendog11)
August 2011 Pages: 1... 2223242526... 39
  Archived months: [jul2011] [sep2011]

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