Beginners - October 2010 (Page 6)

COBAL.... I need some advice
 
So at my college we doing C++ atm but 2day i find out that next year we gonna do cobal. My question is, is it worth it to study cobal next year or to move to a ...
[8 replies] Last: I know COBOL is still widely used, but that doesn't make in any pretti... (by filipe)
C++ maze, have no clue how to solve it
 
You can view a maze as a two-dimensional table in which some elements are blank (representing a pathway) and some have asterisks in them (representing walls). ...
[3 replies] Last: Looks fun. Don't see anything to the right though. (by Pax)
Problem with char and *char arrays. I need some things figured out.
 
Hello, I am trying to do the following. I have 2 character arrays and I want to append characters from the second to the first. However, I have am really con...
[7 replies] Last: Read the tutorial about character sequences (by Bazzy)
Program that identifies prime numbers (I want to check for mistakes)
 
I want to make a program that reads any positive integer the user inputs, and outputs whether it's a prime number or not, without using bool variables.I think I...
[2 replies] Last: well, when n = 3 or 5 (7 shouldn't work either, I believe), sqrt(n) < ... (by hamsterman)
by firix
error conversion
 
Hi I have compiled this code. gives a lot of mistakes. struct X{ int x; X(int); operator+(int); }; struct Y{ int i; Y(X); operator...
[1 reply] : It actually compiles? (by Pax)
Initialize a struct handler
 
Hi, guys. I'm a beginner C++ programmer. Imagine you have this data structure: typedef struct { int num; double height; string name; } TD2; ty...
[7 replies] Last: I recommend that you look at the documentation for LabView. Handl... (by kfmfe04)
Realloc?
 
This is a follow-up exercise to the one related to reference and dereference operators. Stroustrup asks the reader to modify that program to handle an array ov...
[4 replies] Last: No. (by jsmith)
segmentation fault and cout
 
Hello again, When I call the method below and try to print out the results I'm getting a segmentation fault, however if I print out the return value before ret...
[3 replies] Last: Anytime, my friend! (by kooth)
Is it possible to add a new line to the top of a text file.
 
I have used a text file to store some records line by line. I want to know whether is it possible, when adding a new line add it to the beginning of the file.
[1 reply] : You can read all the contents of the file, clear it, write the new fir... (by Bazzy)
why is the output like this ?
 
#include<stdio.h> #define SIZEOF(arr) (sizeof(arr)/sizeof(arr )) #define PrintInt(expr) printf("%s : %d \n" , #expr , expr) void main() { in...
[1 reply] : When you start a number with 0, it's in base 8. (When you start it wit... (by hamsterman)
how to get first 5 letters
 
Sorry just starting with this ! How would I work out letters of a word? i.e temp1=[this is a test] temp2=[this another test] I need to check the fi...
[1 reply] : In the std::string class, the operator gives element access. So, if ... (by Pax)
move cursor
 
I wanna move my cursor to mid, but my lecturer not allow me to using "\t" pliss help me, I's still newbie in programming. I use I use microsoft visual c++ 20...
[9 replies] Last: I made a function for practice where you can select the location of th... (by OHGxLeetGamerxOHG)
dynamic array of strings
 
I just have a couple of questions on how to use dynamic arrays. First let me say I don't know how to use pointers or arrays, etc.. but below is the abbreviated ...
[6 replies] Last: Thanks Disch, I can do that, I just wasn't sure if I could do that... (by keewong)
Returning a value in a void function
 
How would one go about returning a value in a type void function? I would assume that it is possible in some way because my professor has assigned my class an a...
[3 replies] Last: The simplest solution: void sum( int& result, int a, int b ) { r... (by kfmfe04)
Reference and Dereference Operators
 
OK. I thought I understood pointers and such but this exercise is revealing that I do not. The task is to read characters into an array created on free store ...
[5 replies] Last: OK, Disch. I understand what you mean. In my revised code I did what ... (by nathan10)
common problems templating a class? stuck
 
I'm trying to template a class and I'm having some problems. I did everything that my instructor and our book suggested. Here is what my header looks like: ...
[4 replies] Last: change your trinode.cpp file to some other name like trinode.inl ... (by guestgulkan)
Can you pass ints OR strings to the same class without it being templated?
 
I have a program I'm writing that reads from a file and separates the data it receives in a particular way. It is supposed to work the same way whether I give i...
[4 replies] Last: is this your program? http://www.cplusplus.com/forum/beginner/30538... (by kyle11778)
by akline
Roman numeral conversion question
 
Hi, I am a beginner to programming and as an assignment I have to read in a batch file of Roman Numerals and an arithmetic operator and find the result of the e...
[1 reply] : Here is an example of the input file and the correct response Input... (by akline)
by II15X
If Statement Multiple Inputs
 
Hello all, it has been a long, long, time. I have a certain problem in my main. This is just a Fixed-snippet but it gets the very general idea of it. I am cur...
[3 replies] Last: http://www.cplusplus.com/reference/clibrary/cctype/tolower/ (by Bazzy)
Using char in a switch
 
How do you use a variable type char in a switch statement? Below is a segment of code that I'm working on. Can anybody tell me how to fix it? void getMoreF...
[2 replies] Last: Thanks! I appreciate your help. (by kultrva)
October 2010 Pages: 1... 45678... 42
  Archived months: [sep2010] [nov2010]

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