General C++ Programming - July 2011 (Page 5)

What is the ASCII value of '\0'
 
'\0' is used to terminate a string. Does anyone knows its ASCII value?
[2 replies] Last: printf("%d\n", '\0'); Change \0 for any char you want to get the ... (by naderST)
loop help
 
What are the values of i and n after this loop executes? int n = 0; for(int i = 1; i <= 8; i++) { n = n + (i % 2); }
[1 reply] : Once all of the loops finish (8 loops in total), i is popped from th... (by closed account zb0S216C)
Finding a specific word(string) within a txt file...
 
I would like to search a txt file for a specific word...how do I search through a text file for that word... ...also, I would like to place the word within...
[no replies]
how to find the actual size of int array?
 
my problem is that i want to know how many elements of an int array are initialized with values. for eg:- int arr ={1,0,2,9,3}; As u can see the above var 'a...
[11 replies] Last: @Framework: Interesting, but how can you ensure that junk in RAM does... (by webJose)
by nand
Pascal's Triangle
 
Hi, I made a Pascal's Triangle practice problem listed below. I want to ask: 1. What protection can I implement to stop the program when the result overflows...
[2 replies] Last: hi, Thank you for your post. I didn't know about maps at all. I tryed... (by nand)
by gizzmo
friends and templates
 
Hi, I want to put a friend function declaration into .cpp file and keep only its prototype in .h but I keep getting this linker error undefined reference to `s...
[1 reply] : You need to explicit instantiate the functions too. template std::ost... (by ne555)
by elzqsp
How to read from serial port?
 
Hello everyone, I'm relatively new to C++ but currently I need to read/write from a connected arduino board USB serial port using Visual Studio 2008, anyone kn...
[3 replies] Last: could someone post a non pdf version of that link? (by wtf)
by rucafe
using vector accumulate function
 
I am having problems using the accumulate to find the sum of all elements in a vector. Here is what I have: #include "stdafx.h" #include <iostream> #inclu...
[3 replies] Last: Out of interest, what errors are you getting? Andy (by andywestken)
by VGCM63
Getline
 
Hello guys, new in town, Getline will write in a stream but it will also chop any NULL or EOF at the end. So is there a way to know the number of characters ...
[7 replies] Last: If you read the documentation there are states and classes to open a f... (by Azagaros)
by chulio
linear topology
 
Hi, i want to create a linear topology. Each node must have an id and memory. I need help with the struct, which i want to use to create a node. So, what i h...
[4 replies] Last: In c i think we can use realloc in c++ how can this be done ? In C++... (by shacktar)
Coloring Tree Nodes
 
Hello! I am trying to make a program that will 'color' some tree nodes. Just as red-black trees but in this case the coloring will be random. At first the progr...
[1 reply] : Usually when you do one of these type of things we usually see two par... (by Azagaros)
by HenriK
How file reading should be done?
 
Hi, folks! It´s me here. After dealing with fstream for a while, I decided to put this topic up to ask " How file reading should be done ?". This topic...
[6 replies] Last: I would label the data. It might make life harder for the computer, an... (by andywestken)
by h9uest
Image processing questions
 
Hi All: I'll try my luck here. If anyone is good at image processing, please take a look at the following conceptual questions: image histogram correlatio...
[3 replies] Last: @hamsterman: Thank you buddy! I think you're right. (by h9uest)
Source Code For Name Suggestion
 
Hi! I am making a program for my final year School Project. In the program, I have to add a function that accepts a person's name and searches for it in a give...
[6 replies] Last: @creekist: Thanks!!! Helped me a lot! Got an Idea now......... Really ... (by J George)
About Priority-Queue Constructors
 
Hi all, I'm having a question about priority-queue. Its constructors are like this: explicit priority_queue ( const Compare& x = Compare(), ...
[1 reply] : priority_queue <int> MyPQ2(greater <int>); // Ok Also an error. p... (by closed account DSLq5Di1)
Timed If statement
 
I'm currently working on a bot that is in a loop for clicking. Everything's working perfectly although there's one problem... I can't stop it constantly clickin...
[7 replies] Last: Woah yeah, just changed it to a while(1) loop. No idea why I didn't th... (by the swift)
Print a variable in my gotoXY routine
 
I created a gotoXY() routine so that I can print my text at any location on the screen. using namespace System; HANDLE console = GetStdHandle(STD_OUT...
[4 replies] Last: Thank you. That solved the problem. whitenite1 (by whitenite1)
C++ TicTacToe Program
 
Hi, I am stuck on this tic tac toe game. Please help me out. This is my source code 1. Implement displayBoard to display Tic Tac Toe board. 2. Prompt Use...
[1 reply] : First use [co de] code goes here tags. What is the problem you are... (by Nisheeth)
MySQL + C++
 
Hi, could someone tell me how to connect MySQL and C++? I wanna make a program that will write/modify/delete things in tables, I've searched on interned and ...
[2 replies] Last: http://www.mysql.com/downloads/connector/cpp/ (by naderST)
While Loop with string.
 
hi, I'm new to C++ but I do have some beginner's experience with Python. I originally made an application that takes a string and turns it into a "pig latin" st...
[5 replies] Last: The problem with developers that dabble with multiple programming la... (by LinuxUser)
July 2011 Pages: 1... 34567... 30
  Archived months: [jun2011] [aug2011]

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