Beginners - October 2011 (Page 48)

How to pass a c-style string into a fucntion that take a C++ string?
 
I have a constructor that takes a string but my Prof said that if I tried to pass a C-string in that there would be automatic conversion. But I get this erro...
[5 replies] Last: Yes, that will work. However, be sure that whatever char* you pas... (by shacktar)
Have no idea why this is not compiling.. Please Help!
 
Hi am very new to this and am having trouble even running this program. Hope this all gets easier. Compiler is saying its that theres else statements withou...
[8 replies] Last: Every else must have a matching if... The lack of parentheses and add... (by moorecm)
by Gage
Class building errors
 
Good evening! Here is the Employee class I am currently writing for a project. It seems that it isn't recognizing my "using namespace std;" I am getting ...
[1 reply] : We can't really help you without the implementation file and maybe a m... (by BHX)
by Curon
Structure Arrays
 
Situation: I am required to code a program that reads a customer's information from a file, "input.txt" to an array of structures. Then, the user should be ...
[1 reply] : cusArray = setfield(cusArray, i, custID, id); cusArray = setfield(cu... (by sohguanh)
stupid and simple
 
alright this is gonna seem really dumb but, I am finished with my program and have debugged it. i now want to see it as an .exe but i cant seem to find it. i am...
[1 reply] : "projects/projectname/Debug/projectname.exe" I think is the default pa... (by Disch)
Problem involving friend functions and pointers
 
So in this program I'm supposed to create a class that behaves like a vector with elements containing datatypes of the type "double". I'm not that far in but I'...
[2 replies] Last: Thanks shacktar, I got it working. (by bool maybe)
HOW DO YOU ADD TWO ARRAYS WITH DIFFERENT LENGTH
 
I know how to add them if they have the same length, but my problem is how do I add two arrays that has two different lengths? #include <iomanip> #inclu...
[10 replies] Last: Stewbond: using a single int to represent the number defeats the poin... (by Disch)
Can I ???!
 
Hello everyone I have a question for the experienced C++ members. Can I jump from a function (exm: int getInt()) to any place in the program? int ...
[11 replies] Last: Even though you can't invoke main in the C++ standard land, I found th... (by Mathhead200)
If variable != specified character?
 
I've tried this several different ways, and just can't seem to get it to work. This is the section I'm working with: if ( (package == 'Q') || (package == ...
[8 replies] Last: Well I have to have two different inputs. Here's everything I have now... (by mike437)
Help with linked list functions
 
I have to write a program for class that uses a double linked list to store fake email messages that only contain a subject string. The user can enter the subj...
[3 replies] Last: The conditions in the while loops on lines 98 and 104 look wrong. I'm ... (by closed account D80DSL3A)
Compiler?
 
I've downloaded the C++ Language Tutorial but what program do I use to actually write the code and compile it? I've done programming in Lotus and DBase years ba...
[1 reply] : http://lmgtfy.com/?q=c%2B%2B+compiler (by Pyrius)
Explenation
 
I have this constructor that converts a value into float. Can anyone break this down step by step I do not understand the steps in this code. I need this ...
[no replies]
char vs wchar_t
 
Hi Guys Can someone tell what the main difference between char and wchar_t is? For example, if I want to loop through a String array and use the char then...
[1 reply] : if I want to loop through a String array and use the char then it wil... (by helios)
#define conflict
 
I was going over some code written by a colleague today and noticed an issue. She includes a windows header, WinError.h I believe. This header contains a d...
[2 replies] Last: Thanks Athar, I was wondering why it had been working for so long. (by Stewbond)
"expected initializer before ‘bool’"??
 
...
[2 replies] Last: Thanks... have another error it seems... Error: g++ lab1.cpp ... (by gavmcg92)
HOW TO FIND THE POSITION OF THE LARGEST ELEMENT
 
I'm trying to figure out how do you return the position of the largest number? Here is what I have so far. unsigned size = 8; const unsigned a = {3,4,6,1,5,...
[2 replies] Last: KooooOL!! THank you!!!!! This is what I have so far. I have one more q... (by RICEFREAK)
by Ingvvy
Loading a Function that is Before a Function
 
What I want to do is make this work: #include "stdafx.h" #include <stdio.h> #include <stdlib.h> #include <time.h> #include <iostream> using namespace std; i...
[3 replies] Last: Aka prototyping, read under Declaring Functions @ http://www.cplusplus... (by georgewashere)
Why can't I compare command-line arguments in an if statement?
 
For some reason, I can't compare arguments passed through the command line. I don't know the reason, but hopefully some of you do. For example, in this thin...
[2 replies] Last: Okay, thanks! That solves a lot of problems. (by jdgregson)
cout and large lettering
 
Hello, I have some ints that I want to out put into large lettering like 131 would be ().....()......|| ()...(.....)...|| ().........)...|| ().....
[3 replies] Last: Why would you want to do this? If you need fancy displays use a graph... (by cnoeval)
Public variable
 
Hi Guys Can someone tell me how I can create a variable in c++ cli for example the following will not work //I want this to be used by all the follow...
[no replies]
October 2011 Pages: 1... 4647484950... 59
  Archived months: [sep2011] [nov2011]

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