Beginners - January 2009 (Page 5)

Making your own header files
 
I need a good explanation about making header files, and should be explained werry nice and understandable. Thank you, kajzec
[3 replies] Last: Headers usually contain: * An inclusion guard to prevent errors. * I... (by helios)
Simple example for this error C2447
 
I'm very new to programming, just starting out this week. That said, I am doing a simple Hello World program in VS2005. Here is the code #include <iostr...
[4 replies] Last: The function body shouldn't be separed from its head Think that this ... (by Bazzy)
by Timbo1
Error not sure how to fix
 
I get this error : 1>c:\documents and settings\timbo\my documents\visual studio 2008\projects\calculator 2 5\calculator 2 5\main.cpp(20) : error C2447: '{' : mi...
[2 replies] Last: Is likely that you have an extra semicolon, something like this: t... (by Bazzy)
Random Letters
 
Is it possible to have c++ make a random letter? or is there a way possibly to modify, switch (c) { case '1' : maxrand = 15; // the random numb...
[3 replies] Last: (lower case) letters start from character 'a' (ASCII 97) so you would ... (by Bazzy)
writing to file
 
I trying to add records to a binary file but for some reason it takes all the inputs but then will not write them to the file. I have tried various ways of open...
[no replies]
Doubling amounts of "*" per line?
 
Greetings, I need to make a program that outputs 5 lines of asterisks, doubling the amount of asterisks per line. Like so: * ** **** ******** *********...
[9 replies] Last: I know this is a late post, but all you needed to do was add 'mark' ba... (by MikeB)
case study in programming please..
 
please help me, here's the problem, CASE STUDY The user will input a sentence. Your program will determine the longest word/s. Example: Input: Life is ...
[no replies]
Boost with MacPort (cannot recognize library when compiling code)
 
Hi, I have sucessfully installed Boost with MacPort. However when I tried compiling a code with this header #include <boost/lexical_cast.cpp> I...
[2 replies] Last: Check to make sure that /opt/local/include is in your system include p... (by jsmith)
template <class> question
 
Wondering what the difference is in declaring attributes and methods in a class which uses template<>? For example, the code pasted below declares some with <Ty...
[2 replies] Last: I'm not 100% sure, but I think the examples on lines 6 and 9 where the... (by jsmith)
importing ascii data file for analysis
 
Ok this may be a tad long but I am trying to explain what I am looking to do clearly. If anyone can help or point me in the right direction i would greatly appr...
[4 replies] Last: hmm i have not heard of this grep, I will look into that. The other... (by cplusforus)
by suppsh
Infinite Loop and Int value
 
Hi I am learning C (procedural programming now a days) and i have a very basic question, hope i will get help from this forum suppose i have a piece of code ...
[3 replies] Last: Thanks Bazzy for helping. your post have helped me to clear my confusi... (by suppsh)
by Peyton
Directives and Namespaces
 
Having just started with C++, I am higly confused with directives and namespaces. This website defined Namespaces as things which "allow to group entities ...
[1 reply] : A namespace is used to avoid name collision or to group something eg:... (by Bazzy)
by quant
parse cmd-line
 
hi all, I'm need with your help. Suggest me please not hard way to parse like with command-line... 192.168.10.0/24 192.168.20.0/24 192.168.30.0/24 192.168.40....
[5 replies] Last: So, I've quantity hosts and like that chars... &ip = 192 &ip = 168 ... (by quant)
typedef question
 
this seems like a silly question but i'm working through a game scripting book and see alot of typedef struct structname { int a, int b, ... } typedefna...
[3 replies] Last: typedefs are used widely in C++ to abbreviate and give more readable n... (by anders43)
Sum of C-String Integers
 
I have an array of chars where I am requiring the user to enter any number of consecutive integers (ex: 12345) with no spaces. I am attempting to output the su...
[3 replies] Last: the problem is that atoi() requires a null-terminated string as argume... (by anders43)
Pass by Reference versus Pass by Pointer in Function
 
Hi expert, In all my code, I have used only pass by reference in function. Be it reference of Map, Int, or Vector. My question are. 1. Is there any cas...
[4 replies] Last: You can do that with references too. (by jsmith)
array and pointer questions
 
i was given an assignment by my prof. , but he stated that using pointer notation . the object t=of the program was to write a C++ function ReverseArray using "...
[5 replies] Last: There is no difference....arrray and *(array+i) are the same. (by firedraco)
Question: Design Problem (Class and STL)
 
I have a design question. I have table in Data Base with 3 fields. Table X ( Nbr (Unique and unsigned int), Status (int), Customer Name). I have fixed Nbr from...
[2 replies] Last: Thank you. I will try to implement Class X{} and use Vector / List ... (by cppg2009)
Problems with isupper & islower functions
 
I'm working on a password validator program and I can't understand why it continues to crash. Visual studio throws a debug assertion failed. My code is below....
[7 replies] Last: That was the problem. Thanks! (by Return 0)
Classes
 
Hi, I'm new to C++ and in a course I'm taking, we wrote our first program in C and its objective was to use recursion and an adjacency matrix to find how many p...
[2 replies] Last: I too, thought about tree since they want a recursive structure. I f... (by djorhe)
January 2009 Pages: 1... 34567... 16
  Archived months: [dec2008] [feb2009]

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