User Profile

Collapse

Profile Sidebar

Collapse
slippingslider
slippingslider
Last Activity: Apr 15 '07, 04:26 PM
Joined: Mar 11 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • slippingslider
    replied to Inputting Data which contain spaces.
    in C
    Yes it helped! This issue is resolved thanks a lot!...
    See more | Go to post

    Leave a comment:


  • slippingslider
    replied to Inputting Data which contain spaces.
    in C
    Thanks Folks you two have been helpful.
    Aparently, I did not occur to me that the reasons for the errors were because I hadn't recalled the function via class name (eg void Heading:: GetData) I just figured since it was in the public section of the class, there was no need for addressing it like that.. thanks for the foresight Gparnamg.

    Banfa thanks for the refered site, I've had it taged on my fav for future use. Your explanations...
    See more | Go to post

    Leave a comment:


  • slippingslider
    replied to Inputting Data which contain spaces.
    in C
    I acctually did use the right quotation mark for strings and changed it because I couldn't still id the identifier "companynam e" as being declared. I got errors that they(companynam e & reportname) were undeclared identifiers. So I tried using the char* and changing the quotations, but I still got the same result. The other person who suggested allocating space for memory, got me confused with:
    {
    companyname = new char[strlen[cname]+1];...
    See more | Go to post

    Leave a comment:


  • slippingslider
    replied to Inputting Data which contain spaces.
    in C
    Sorry, I should have said I'm new to C++, and I didn't understand your suggestion. I wasn't even aware there was a command called new char. I can't find that in any of the two C++ books I'm reading, how bout If I use strings in this manner: What seems to be the problem with the default constructor & why is it that the companyname and reportname end up as undeclared.
    thanks

    class Heading
    {
    private:
    ...
    See more | Go to post

    Leave a comment:


  • slippingslider
    started a topic Inputting Data which contain spaces.
    in C

    Inputting Data which contain spaces.

    I tried using string and had problems, and now Im trying char* and I cannot still initialize "ABC Industries" as a default constructor. It appears that spaces between words make char variable uninitialized. How can I avoid this? Pls help. I'm trying to read a set of words that may contain spaces in them.

    class Heading
    {
    private:
    char* companyname;
    char* reportname;
    public:
    ...
    See more | Go to post

  • slippingslider
    replied to Error C2664, C2228
    in C
    I tried that already so it builds but the problem is there is something wrong with the input, it doesn't redisplay the entered number. It just shows a 0 even if the number entered is 58.

    Thats why I was thinking it was the way I was reading the input so I tried using cin.get...
    See more | Go to post

    Leave a comment:


  • slippingslider
    replied to Error C2664, C2228
    in C
    yeah, u r right but that's for the error c2228 [It should have been a semicolon]

    For the error c2664 on line 26 and 33. If I took away the "input" in the cin.get(input), the error would go away but it doesnt yet do what I'd like it to do...
    See more | Go to post

    Leave a comment:


  • slippingslider
    started a topic Error C2664, C2228
    in C

    Error C2664, C2228

    I'm trying to learn how to set ranges by using classes and I get Error c2664 and C2228 when I build. I saw the question in my practice texrbook and I cant figure out what I'm missing.

    It says "ui" should have a class on the left of "ui' but it already does.

    Its declared right after the Range. Can you help
    Code:
    #include <iostream>
    #include <iomanip>
    #include <string>
    ...
    See more | Go to post
    Last edited by horace1; Mar 18 '07, 03:59 PM. Reason: added code tags

  • slippingslider
    started a topic Logical Error: Help Pls.
    in C

    Logical Error: Help Pls.

    can someone pls tell me why this thing would not calculate my division intergers and show it within my struct. PLS HELP I'M NEW TO C++, AND HAVE SPENT 4 DAYS TRYING TO FIND OUT WHY I CANT DO THIS THING RIGHT. I'M ACCTUALLY TRYING TO FIGURE OUT HOW STRUCTS WORK BUT IT SEEMS LIKE I CANT GET IT TO TOTAL MY INTERGER AND DISPLAY IT WHEN I CALL THEM IN MAIN.

    THANKS


    Code:
    #include <iostream>
    #include <iomanip>
    ...
    See more | Go to post
    Last edited by Ganon11; Mar 12 '07, 12:20 PM. Reason: code tags added
No activity results to display
Show More
Working...