Showing results 1 to 40 of 91
Search took 0.01 seconds.
Posts Made By: Jon182
Forum: MS SQL May 7th, 2008
Replies: 1
Views: 1,864
Posted By Jon182
select date/time issue

Hey guys,

I am trying to design a query that will return all the records based on a single date but because of the date/time data type in MS SQL 2005 it defaults to the date and the time 00:00:00...
Forum: MS SQL Apr 14th, 2008
Replies: 1
Views: 560
Posted By Jon182
Query logic

Hi, sorry for a newbie question but I was wondering if the following is possible:

I have to select some information from a table which I have already created a query for. This information then has...
Forum: C++ Mar 2nd, 2006
Replies: 24
Views: 2,451
Posted By Jon182
Re: int problem

Thanks for that, I have used similar code to search for FOR loops how ever if someone writes a for loop like the following with no whitespace after the for:
for(int k=0; k<10; k++)

I thought I...
Forum: C++ Mar 1st, 2006
Replies: 24
Views: 2,451
Posted By Jon182
Re: int problem

Hi for that example I would not use a pointer so does that mean that the code: if( ptr == line || isspace(*(ptr-1)))
would then ignore that string? and wouldn't it do this anyway without the line of...
Forum: C++ Mar 1st, 2006
Replies: 24
Views: 2,451
Posted By Jon182
Re: int problem

Hi I have just two questions about the code below when using char *ptr = strstr(line,"james smith "); does this mean that the if statement:
if( ptr == line || isspace(*(ptr-1))) is no longer...
Forum: C Feb 26th, 2006
Replies: 11
Views: 1,420
Posted By Jon182
Re: Pointer logic advice

Thanks again narue, I am a bit confused by your code could you explain it for me please.
Forum: C++ Feb 26th, 2006
Replies: 2
Views: 801
Posted By Jon182
syntax advice nedded

Hey guys, I have the following two pieces of code and I am trying to combine them so it will say if hello is found and it is at the start or the prevous character is whitespace then add one to the...
Forum: C Feb 25th, 2006
Replies: 11
Views: 1,420
Posted By Jon182
Re: Pointer logic advice

Thanks again narue, if I also did a search for the "=" would that solve the problem or is there anymore that would then cause?
Forum: C Feb 25th, 2006
Replies: 11
Views: 1,420
Posted By Jon182
Re: Pointer logic advice

Hi Narue thanks again for your reply, my program does not have to be that detailed. (Which is lucky!) I was thinking about other ways this could be done I was thinking about reading in a line at a...
Forum: C Feb 24th, 2006
Replies: 11
Views: 1,420
Posted By Jon182
Re: Pointer logic advice

Thanks Narue, When you say not allowing for 100% of the variations do you mean like a new line etc?

Thanks.
Forum: C Feb 24th, 2006
Replies: 11
Views: 1,420
Posted By Jon182
Re: Pointer logic advice

I believe I will need some kind of pointer that will be able to pick out that the last element is a semicolon but I am not sure how this would work as the semicolon could be the last character but...
Forum: C Feb 23rd, 2006
Replies: 11
Views: 1,420
Posted By Jon182
Re: Pointer logic advice

I am currently making a program that counts function prototypes in source code stored in a text file very basic program and source code in the text file.

At the moment I am counting the prototypes...
Forum: C Feb 23rd, 2006
Replies: 11
Views: 1,420
Posted By Jon182
Pointer logic advice

Hey guys I am using code like the following:

But I would like to say if a semi colon appears at any stage after a ")" (closing bracket) add one to count.

Any advice thanks. ( I am also using a...
Forum: C Feb 23rd, 2006
Replies: 15
Views: 1,826
Posted By Jon182
Re: Help with code

Thanks I have got it sorted but I was just wondering what the following part of the code does:


if(ch && ch == string


thanks again
Forum: C Feb 22nd, 2006
Replies: 15
Views: 1,826
Posted By Jon182
Re: Help with code

Hi this is my code I have the longer if and extra while loop.

I am still using the same test data and it says there is 8 ints when there should only be 4 as I started the array just after the first...
Forum: C Feb 22nd, 2006
Replies: 15
Views: 1,826
Posted By Jon182
Re: Help with code

I am still getting the wrong number of ints (8) and chars(4) the only difference between the code I tested and the code you have is that I started the array after the first brace and the array data...
Forum: C Feb 22nd, 2006
Replies: 15
Views: 1,826
Posted By Jon182
Re: Help with code

thanks I will look into it now
Forum: C Feb 22nd, 2006
Replies: 15
Views: 1,826
Posted By Jon182
Re: Help with code

Can you give me any advice acient dragon?
Forum: C Feb 22nd, 2006
Replies: 15
Views: 1,826
Posted By Jon182
Re: Help with code

Thanks for you help guys, in my program at the moment I am trying to count int & char paramters, I have the code that starts the array after the open brace and I am using the code below to give the...
Forum: C Feb 22nd, 2006
Replies: 15
Views: 1,826
Posted By Jon182
Re: Help with code

hi thanks for the reply I couldn't get it to work here is the code at the moment it deals with if it is at the start or previous character is whitespace but i also need the or comma...
Forum: C++ Feb 21st, 2006
Replies: 2
Views: 1,100
Posted By Jon182
Re: Switch logic error

Thanks for your reply Ancient Dragon, if you get a moment can you please see my other post. Thanks again
Forum: C Feb 21st, 2006
Replies: 15
Views: 1,826
Posted By Jon182
Help with code pointer problem

Hey guys I have been trying to expand the following code but have had no luck, is there anyway I could also make this code say if the previous character is space or a is comma? Thanks.



//temp is...
Forum: C++ Feb 21st, 2006
Replies: 2
Views: 1,100
Posted By Jon182
Switch logic error

Hey guys I am just wondering why the following code gives the wrong number of characters from a file when the character count is the default? Thanks.



void main()
{
int blank_count = 0;
int...
Forum: C Feb 21st, 2006
Replies: 4
Views: 1,023
Posted By Jon182
Re: syntax error

Thanks in the end I couldn't use the || even with the correct syntax and just has to use another while loop or for some reason the program would crash. Not sure why it was crashing though.
Forum: C Feb 21st, 2006
Replies: 4
Views: 1,023
Posted By Jon182
Re: syntax error

Hi thanks for your reply the logic seems to be working alright for me. What do you think was wrong with it?

Thanks.
Forum: C Feb 21st, 2006
Replies: 4
Views: 1,023
Posted By Jon182
syntax error

hey guys, I am using the following code to count from a text file but I also want to check for ",jo " as well as "jo " I was trying to do it by using while((ch = strstr( ch, "jo ")) != 0) ||...
Forum: C++ Feb 20th, 2006
Replies: 24
Views: 2,451
Posted By Jon182
Re: int problem

Yeah it does seem to work when I tried it with your code, I will go through mine line by line until I figure out what was wrong.
Forum: C++ Feb 20th, 2006
Replies: 24
Views: 2,451
Posted By Jon182
Re: int problem

The only difference with my code was it has a for loop. Still not working for some reason.


#include <iostream>
#include <cmath>
using namespace std;

int main()
{
char line[] = "james smith and...
Forum: C++ Feb 20th, 2006
Replies: 24
Views: 2,451
Posted By Jon182
Re: int problem

#include <iostream>
#include <cmath>
using namespace std;

int main()
{
char line[] = "james smith and son";
char *ptr = strstr(line,"james smith ");
if(ptr != 0)
{
Forum: C++ Feb 19th, 2006
Replies: 24
Views: 2,451
Posted By Jon182
Re: int problem

Hi thanks for you help I am just wondering how come the following code doesn't work for two words for example james smith, I have been trying all day to get it to work this way but have had no...
Forum: C++ Feb 19th, 2006
Replies: 24
Views: 2,451
Posted By Jon182
Re: int problem

Thanks for your help that was very cleaver coding, im not sure of the syntax: isspace(*(ptr-1))) but I am going to look into that in more detail.

I am still having the problem that if two ints are...
Forum: C++ Feb 19th, 2006
Replies: 24
Views: 2,451
Posted By Jon182
Re: int problem

I can 't figure this out I even tried reading until white space but that won't work either because of the whitespace search "float myint "

while (file >> array)
{
if ( (ch=strstr ( array, "int" ))...
Forum: C++ Feb 19th, 2006
Replies: 24
Views: 2,451
Posted By Jon182
Re: int problem

Thanks for your help would you mind giving me more of a hint towards the "float myint " problem as I can't figure it out.

I am also not sure what the following line of code does.


p =...
Forum: C++ Feb 19th, 2006
Replies: 24
Views: 2,451
Posted By Jon182
Re: int problem

Im kind of confused now does the code you posted, take care of both the "float myint" pproblems i see how it takes care of the first one by checking for a space after the int but im not sure how it...
Forum: C++ Feb 19th, 2006
Replies: 24
Views: 2,451
Posted By Jon182
Re: int problem

Thanks, I have to use arrays for this code but with the strstr function if i use "Int " it will bring up the wrong number of ints.

If you have time could you please update where I have went wrong...
Forum: C++ Feb 19th, 2006
Replies: 24
Views: 2,451
Posted By Jon182
Re: int problem

Hi I managed to get the above code working but if two ints appear on the same line like:

int j; int k; the second will be ignored I have tried to use a pointer to solve this but it has not worked...
Forum: C++ Feb 18th, 2006
Replies: 24
Views: 2,451
Posted By Jon182
int problem

Hey guys, I am in the process of a program that counts integers I can do this by looking for the int keywork and then incrementing a variable although if an integers are implemented as:

int...
Forum: C++ Feb 18th, 2006
Replies: 3
Views: 1,464
Posted By Jon182
Re: whitespace

Thanks Narue does it have to be replaced with '\0' or is it just a '0'? and would I have to replace all of the whitespace or just the last one for example:

"k,i,m, 0, , , ,0"

Also would it be...
Forum: C++ Feb 18th, 2006
Replies: 3
Views: 1,464
Posted By Jon182
whitespace

Hey guys I was just wondering is there a c++ function that will eliminate white space from the start and end of a character array data obtained with the getline function? Thanks.
Forum: C Feb 18th, 2006
Replies: 4
Views: 954
Posted By Jon182
Re: Another counting problem

Hi sorry if I wasn't being clear, I am trying to create a program that will count integers from simple source code stored in a text file the code I posed above does this by counting the words that...
Showing results 1 to 40 of 91

 
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 4:09 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC