User Profile

Collapse

Profile Sidebar

Collapse
varusnyc
varusnyc
Last Activity: Nov 28 '06, 11:11 PM
Joined: Oct 10 '06
Location: NYC
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • varusnyc
    replied to New to Strings Please help
    in C
    I was able to solve it, and now Im stuck at new piece of code:
    call the function matchexact() passing the two strings. matchexact() will determine how many times the corresponding positions in the two strings hold exactly the same characters. The function will print this value.
    For example, if the two strings are "marriage" and "gerbil", then the function matchexact will return 2, since the two strings have
    ...
    See more | Go to post

    Leave a comment:


  • varusnyc
    started a topic New to Strings Please help
    in C

    New to Strings Please help

    Hello,
    I just started learning strings and dont even know how to properly execute simple part of the program that splits phrase of two words with one space in between into 2 separate strings. I realize that substr() need to be used, but words may varie in length so I have to make it initialize first string any length before first space and second string after the space.
    For example: "computer science"
    into first string...
    See more | Go to post

  • varusnyc
    replied to Please help with Arrays and Bool
    in C
    anybody?....... .
    See more | Go to post

    Leave a comment:


  • varusnyc
    started a topic Please help with Arrays and Bool
    in C

    Please help with Arrays and Bool

    Hello,
    I've been struggling with this assignment for very long now. I'm not even sure how to start the code right, as well as the structure of it. My code is a complete mess, and Im not sure what I'm brainstorming here. I really need help on this. I will really appreciate it. Here's whats being asked of me:

    In a loop your program should do the following (you can use a do/while):

    receive as data input the weights...
    See more | Go to post

  • varusnyc
    replied to Problem with Functions using in/outfile
    in C
    I think I understand what you mean. But Im still confused on how to actually work with the code to make it work like that. Could you please show me an example with piece of my main, call my functions with proper parameters assigned to them and how will it actually be structured inside main for everything to go into outfile without overriding anything, but rather adding information. Thanks.
    See more | Go to post

    Leave a comment:


  • varusnyc
    started a topic Problem with Functions using in/outfile
    in C

    Problem with Functions using in/outfile

    Hello,
    Im having really hard time writing an Employee Payroll program that uses functions to read data from file then send all data to another file. I managed to construct some pieces of the code, but I cant figure out how to put it together. Here's the description of whats needed to be done:

    Write a program that generates an Employee Payroll. All output should go to payroll.out. The input for the program should be read from...
    See more | Go to post

  • varusnyc
    replied to Functions & Files
    in C
    Thank you apusateri, you cleared up a lot of things for me. Also, thats pretty useful source you gave me, Im trying to figure out how to make all output automatically go to file without specifying "outfile" each time (if thats possible).
    See more | Go to post

    Leave a comment:


  • varusnyc
    replied to Functions & Files
    in C
    Thank you, The program works great, I really appreciate all your help!
    Just one more thing, i modified the program to work in a while loop. How do I make all output go into a file using ofstream outfile("file.o ut");? Here's a piece of this program with the while loop part:
    Code:
    #include <iostream>
    #include <fstream>
    #include <math.h>
    using namespace std;
    int findLargest(int
    ...
    See more | Go to post

    Leave a comment:


  • varusnyc
    replied to Functions & Files
    in C
    Thank you, The program works great, I really appreciate all your help!
    Just one more thing, i modified the program to work in a while loop, how do I make all output go into a file using ofstream outfile("file.o ut");? Here's a piece of this program with the while loop part:
    Code:
    #include <iostream>
    #include <fstream>
    #include <math.h>
    using namespace std;
    int findLargest(int
    ...
    See more | Go to post

    Leave a comment:


  • varusnyc
    replied to Functions & Files
    in C
    I was able to get 1 function to work, but I'm not sure how to add 2 more functions to it. Please help.
    Code:
    #include <iostream>
    #include <fstream>
    #include <math.h>
    using namespace std;
    int findLargest(int a, int b, int c)
    {
           cin >> a;
           cin >> b;
           cin >> c;
    	int largest = a;
    	if(largest < b)
    		largest = b;
    ...
    See more | Go to post

    Leave a comment:


  • varusnyc
    replied to Functions & Files
    in C
    I was trying similar functions and it always comes up with same error, the code you provided comes up with it as well:
    [Linker error] undefined reference to `WinMain@16'
    ld returned 1 exit status

    Can you please be little more specific on what I need to return, and do I need to use int main () in this program?
    Thanks for your help.
    See more | Go to post

    Leave a comment:


  • varusnyc
    started a topic Functions & Files
    in C

    Functions & Files

    Hello,
    I seem to be having a newbie problem with writng a simple program consisting of 3 functions. Here is what's being asked of me:

    Your main function should call the function printMyName which will print out your name and a description of the program (see details below)
    Next, in a while loop you should do the following:
    read in three integers
    print out all three numbers to your output file (hw3.out)....
    See more | Go to post
No activity results to display
Show More
Working...