Beginners - March 2010 (Page 17)

Question about C++ knowledge for job
 
Hi, I'm currently a 2nd year computer science student and currently taking c++. I am planning on getting an internship hopefully this summer and was wondering...
[2 replies] Last: Coming directly out of school, the expectations set upon you during an... (by jsmith)
Purpose of Iterators?
 
I am not really understanding the purpose of an iterator. What is the difference between these two: for(int i = vector.begin(); i != vector.end(); i++) a...
[1 reply] : Neither compiles, but the second one would if the variable were not na... (by jsmith)
by michy
strcmp
 
hi there, a newbie is back to ask some newbie question again =).. i have a line of code: user *temp, *temp2; if (strcmp(temp->username , temp2->userna...
[7 replies] Last: You can pretty much prefer string everywhere. Unless you are in C, whi... (by Zhuge)
Games Programming
 
i'm aware that C++ is able to make games, however is it true that most big online rpg games like World of Warcraft (http://www.worldofwarcraft.com) and MapleS...
[12 replies] Last: [quote=Seraphimsan]Lol, I have a friend who opted to learn C# as his f... (by Return 0)
by KC2010
cannot get search to work properly.
 
#include <stdlib.h> #include <stdio.h> #include <string.h> #define MAX 25 #define S_SIZE 30 #define NAME_SIZE 20 #define STATE_SIZE 3 #define CODE_S...
[no replies]
2 getlines in if statement
 
First let me start by saying I'm new to the world of programing, and finishing up my first semester of class on this subject so please bare with me. And I apol...
[no replies]
Converting base 8
 
Consider the following function that converts a positive decimal number to base 8 and displays the result. I dont know how to trace the function
[1 reply] : To "trace" they mean show what the value of n is at each step. So... (by Duthomhas)
bisection method to find roots
 
I've worked out a method to solve the roots and too print the root. but I want to show the values at each iteration step. every time i seem to do something i m...
[no replies]
Run time Failure- Stack around the variable was corrupted
 
I hit upon this run time failure. Looks like some initialization error The purpose of this program is to reverse a string word by word. Input String : "This...
[2 replies] Last: That was the problem. The test {s !='\0'} was wrong. Changed the te... (by funprogrammer)
output display is wrong
 
I am working on an assignment that generates random numbers, writes them to a file, reads them back and displays them on the screen with 10 per row. The proble...
[3 replies] Last: You're welcome. And to be honest, I was lucky with line 8. Just tried... (by Mathes)
Quick Sort
 
Implement the quick sort algorithm in C++ as it sorts the following array into ascending order. List the calls to quicksort and to partition in the order in whi...
[2 replies] Last: Here is a way http://www.cplusplus.com/reference/algorithm/sort/ (by OnymousIllusion)
Error checking an array
 
I'm writing a program which calculates the average rainfall for 12 months. I need to make sure no chars or negative numbers are inputted into my array but I'm ...
[2 replies] Last: it didnt work, i dont quite know what you mean by failbit. (by Hibochi)
by lost
divide weights into two groups
 
Hi, I need to write program which would divite weights into two groups as equal as possible. But I can not think algorithm for this task. Any help?
[9 replies] Last: I assume OP is looking for an algorithm that generates the optimal sol... (by jsmith)
VOID function
 
What is wrong with the following function? void Square (int& x) { x = x * x; return 0; }
[12 replies] Last: what i meant was you have to use return; instead of return whatever... (by Mathes)
by tidbit
trying to pull a specific digit from an intiger
 
Hello, I have been trying to figure out how to cout a specific digit from an integer and I am not quite sure where to begin. I have been reading over guides...
[5 replies] Last: Thank you for the explanation on strings. I was thinking using a strin... (by tidbit)
CALL FUNCTION WITH SET TIME PERIOD IN A BACKGROUND
 
Hello, all. I have a software written, which has some GUI under Linux, working with Sqlite bases. Now there is an add - I have to send some data via serial p...
[3 replies] Last: Boost Asio is a framework for doing what you need. Look at the core A... (by PanGalactic)
C++ read file
 
There is one line in file data.txt: Name Sur 122 I need to read this line into 2 variables: pvd = "Name Sur " - 11 characters, numb = 122. #includ...
[6 replies] Last: Thx :) (by SuperHP)
Constructor's calls
 
class base { base() {} ~base() {} }; class extended1 : public base { public: extended1():base() {} ~ extended1() {} }; C...
[4 replies] Last: You should think twice about not using a virtual destructor on base. (by kbw)
reading several files in the loop
 
Hi, I want to read several files in a loop & use that in my code. Can anyone help please. I am new in this field. Also how to define different file names...
[1 reply] : ifstream theFile1("file1.txt"); ifstream theFile2("file2.txt"); s... (by crimson)
by mmthob
dice game
 
can anyone help me with this: You task is to write a C++ program for a new kind of dice game. In this game, only 3 (three) dice are used. You need to write a ...
[2 replies] Last: I'm no heavy weight coder by any means, but it definitely looks as if ... (by wolfcry)
March 2010 Pages: 1... 1516171819... 34
  Archived months: [feb2010] [apr2010]

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