Search:

Type: Posts; User: steals10304

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Setting up Visual Studio 2008 for ANSI Compliance

    Apologies if this in the wrong forum. Can any one tell me how to turn off the Microsoft non-standard extensions to create an ANSI standard project?

    Thanks!
  2. Replies
    10
    Views
    3,879

    I've tried this, but the memory leak report does...

    I've tried this, but the memory leak report does not show up in the output box. I am not sure what is preventing it.
  3. Replies
    10
    Views
    3,879

    I'm running windows. It looks like Valgrind is...

    I'm running windows. It looks like Valgrind is for a linux box. Also, I'm a student and don't want to buy anything.
  4. Replies
    10
    Views
    3,879

    Will my memory leak? --school project

    I am wondering if the class I have designed will leak memory. Does my destructor do all neccesary clean up? I appreciate any help you can offer. I attempted to find a easy to use leak detector,...
  5. Why is tmpfile returning my stderr message?

    FILE *OpenTemporaryFile(void)
    {
    FILE *pFile;
    if((pFile = tmpfile()) == NULL)
    {
    fprintf(stderr, "Cant open temp file\n");
    exit(EXIT_FAILURE);
    }
    return pFile;
    }
  6. Read single words seperated by white space in as strings

    I am trying to read from a text file, and have each word become a new string. Is fgets a bad weapon of choice? It reads until a \n character, I guess I need to read until ' '?




    LIST...
  7. Replies
    3
    Views
    2,906

    Yes, forgive me for my noobness (if that's not a...

    Yes, forgive me for my noobness (if that's not a word, I just coined it), but shouldn't you be able to access any 2 Dimensional pointer array with [two][subscript] notation?

    One requirement of...
  8. Replies
    3
    Views
    2,906

    Dynamically allocate 2D array of ints

    In this problem, I am required to allocate memory ALL AT ONCE. Only one dynamic allocation is allowed. I believe I have code that will allocate all memory needed:




    int ** p;
    int cols,...
  9. Novice Programmer Humbly Requests Job Seeking Advice

    I wanted to get a couple opinions on how to get hired as a software engineer given my low level of expertise. Would you be willing to give me advice?

    About me: BA in Business Administration from...
  10. Sure.... strtok function tests each incoming...

    Sure....

    strtok function tests each incoming char against a set of arbitrary delimiters (AEIOUaeiou\n), if said char is not one of these control falls to puts(cp). After it finds a delimiter it...
  11. I think it should be right before puts(cp) here:...

    I think it should be right before puts(cp) here:




    for(cp = buf; cp = strtok(cp, "AEIOUaeiou\n"); cp = NULL)
    puts(cp);
    puts(buf);

    [
  12. Need this program to skip leading whitespace using isspace()

    I need function ParseStringFields() to skip leading white space in each delimited field created by the strtok function. I must use isspace() function. I am having a hard time with this? Help?
    ...
  13. What is the datatype? -- possible array decay?

    given:

    float numbers[25];

    what is the data type of numbers in the following:

    &(numbers + printf("Hello"));

    I think it would still be an array of floats?
  14. Replies
    3
    Views
    3,149

    Hmmm... I retyped them and they appeared like the...

    Hmmm... I retyped them and they appeared like the ones around the file name. Then the program compiled just fine. Were they italicized before?

    Thanks anyway.
  15. Replies
    3
    Views
    3,149

    Simple fopen not working...

    I am a noob. Here is a simple fopen, I am trying to create this file. However I am getting the following errors:

    1>c:\users\robert\documents\visual studio 2008\projects\test\test\source.c(9) :...
  16. I know how to get input from the keyboard. I do...

    I know how to get input from the keyboard. I do not know how to loop the program so that it prints three lines, waits for the enter key to print three more ect...
  17. Thank you, it works, I am trying to add one more feature...

    I would like the program to wait for user to hit the newline (Enter key) after it prints the first 3 lines of text, if the enter key is hit the program will print three more lines of text, this...
  18. Fixed the compiler errors, but no text prints...

    I was hoping this would print the first three lines of text?

    Here is my code:


    #include <stdio.h>
    #include <stdlib.h>
    #define LINECOUNT 3
    #define SOURCE_FILE...
  19. Still not getting it...

    So the code should read:
    for(lineCounter = 0; lineCounter <= LINECOUNT;) ?

    Still doesn't work.
  20. Open file and print user selected number of lines

    I am getting compiler errors in my for loop and an illegal break within said for loop...Help?

    Errors:

    1>c:\users\robert\my programs\assignment 8_exercise 2\source.c(36) : error C2143: syntax...
  21. Replies
    1
    Views
    1,037

    my getline funtion is not working?

    It just skips to the next cout...




    #include <iostream>
    #include <cstdlib>
    #include <string>
    using namespace std;
  22. Replies
    3
    Views
    4,747

    Sorry...Here are the first few errors:

    1>c:\users\robert\my programs\assignment 8 exercise 1\source 1.cpp(32) : error C2784: 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const...
  23. Replies
    3
    Views
    4,747

    What is wrong with the following code?

    Thanks:




    #include <iostream>
    #include <cstdlib>
    #include <string>
    using std::string;
    using namespace std;
  24. Thank you

    Duh! Thanks.
  25. what am I missing? (Program won't compile)

    The following program will not compile, it gives me a long line of errors:
    >Source 1.c
    1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(39) : error C2143: syntax error :...
Results 1 to 25 of 35
Page 1 of 2 1 2